mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
23 lines
476 B
JavaScript
23 lines
476 B
JavaScript
'use strict';
|
|
|
|
var oDP = Object.defineProperty;
|
|
try {
|
|
oDP({}, 'a', { value: 1 });
|
|
} catch (e) {
|
|
// IE 8
|
|
oDP = null;
|
|
}
|
|
|
|
module.exports = function defineProperty(O, P, Desc) {
|
|
if (oDP) {
|
|
return oDP(O, P, Desc);
|
|
}
|
|
if ((Desc.enumerable && Desc.configurable && Desc.writable) || !(P in O)) {
|
|
O[P] = Desc.value; // eslint-disable-line no-param-reassign
|
|
return O;
|
|
}
|
|
|
|
throw new SyntaxError('helper does not yet support this configuration');
|
|
};
|
|
module.exports.oDP = oDP;
|