You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
unboundedpress/node_modules/empower-core/lib/define-properties.js

20 lines
535 B
JavaScript

5 years ago
'use strict';
var defineProperty = require('core-js/library/fn/object/define-property');
var foreach = require('core-js/library/fn/array/for-each');
var keys = require('core-js/library/fn/object/keys');
var defineProperties = function (object, map) {
var props = keys(map);
foreach(props, function (name) {
defineProperty(object, name, {
configurable: true,
enumerable: false,
value: map[name],
writable: true
});
});
};
module.exports = defineProperties;