Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2020/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 var OwnPropertyKeys = require(' ../helpers/OwnPropertyKeys');8 var OwnPropertyKeys = require('own-keys'); 9 9 10 10 var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); … … 14 14 var IsArray = require('./IsArray'); 15 15 var IsInteger = require('./IsInteger'); 16 var IsPropertyKey = require('./IsPropertyKey');16 var isPropertyKey = require('../helpers/isPropertyKey'); 17 17 var SameValue = require('./SameValue'); 18 18 var ToNumber = require('./ToNumber'); 19 19 var ToObject = require('./ToObject'); 20 var Type = require('./Type'); 20 21 var isObject = require('../helpers/isObject'); 21 22 22 23 // https://262.ecma-international.org/11.0/#sec-copydataproperties 23 24 24 25 module.exports = function CopyDataProperties(target, source, excludedItems) { 25 if ( Type(target) !== 'Object') {26 if (!isObject(target)) { 26 27 throw new $TypeError('Assertion failed: "target" must be an Object'); 27 28 } 28 29 29 if (!IsArray(excludedItems) || !every(excludedItems, IsPropertyKey)) {30 if (!IsArray(excludedItems) || !every(excludedItems, isPropertyKey)) { 30 31 throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); 31 32 }
Note:
See TracChangeset
for help on using the changeset viewer.