Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2021/CopyDataProperties.js
r0c6b92a r79a0317 3 3 var $TypeError = require('es-errors/type'); 4 4 5 var callBound = require('call-b ind/callBound');5 var callBound = require('call-bound'); 6 6 var forEach = require('../helpers/forEach'); 7 7 var every = require('../helpers/every'); 8 8 var some = require('../helpers/some'); 9 var OwnPropertyKeys = require(' ../helpers/OwnPropertyKeys');9 var OwnPropertyKeys = require('own-keys'); 10 10 11 11 var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); … … 15 15 var IsArray = require('./IsArray'); 16 16 var IsIntegralNumber = require('./IsIntegralNumber'); 17 var IsPropertyKey = require('./IsPropertyKey');17 var isPropertyKey = require('../helpers/isPropertyKey'); 18 18 var SameValue = require('./SameValue'); 19 19 var ToNumber = require('./ToNumber'); 20 20 var ToObject = require('./ToObject'); 21 var Type = require('./Type'); 21 22 var isObject = require('../helpers/isObject'); 22 23 23 24 // https://262.ecma-international.org/12.0/#sec-copydataproperties 24 25 25 26 module.exports = function CopyDataProperties(target, source, excludedItems) { 26 if ( Type(target) !== 'Object') {27 if (!isObject(target)) { 27 28 throw new $TypeError('Assertion failed: "target" must be an Object'); 28 29 } 29 30 30 if (!IsArray(excludedItems) || !every(excludedItems, IsPropertyKey)) {31 if (!IsArray(excludedItems) || !every(excludedItems, isPropertyKey)) { 31 32 throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); 32 33 }
Note:
See TracChangeset
for help on using the changeset viewer.