diff options
Diffstat (limited to 'node_modules/babel-runtime/helpers/defineProperty.js')
-rw-r--r-- | node_modules/babel-runtime/helpers/defineProperty.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/node_modules/babel-runtime/helpers/defineProperty.js b/node_modules/babel-runtime/helpers/defineProperty.js new file mode 100644 index 000000000..b0f46d804 --- /dev/null +++ b/node_modules/babel-runtime/helpers/defineProperty.js @@ -0,0 +1,24 @@ +"use strict"; + +exports.__esModule = true; + +var _defineProperty = require("../core-js/object/define-property"); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +};
\ No newline at end of file |