mirror of
https://github.com/actions/labeler.git
synced 2025-12-20 06:54:16 +00:00
build
This commit is contained in:
22
node_modules/es-abstract/test/helpers/defineProperty.js
generated
vendored
Normal file
22
node_modules/es-abstract/test/helpers/defineProperty.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'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;
|
||||
Reference in New Issue
Block a user