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.
20 lines
535 B
JavaScript
20 lines
535 B
JavaScript
6 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;
|