node_modules/es-abstract/2020/CreateDataProperty.js in immosquare-cleaner-0.1.60 vs node_modules/es-abstract/2020/CreateDataProperty.js in immosquare-cleaner-0.1.61

- old
+ new

@@ -1,20 +1,21 @@ 'use strict'; var $TypeError = require('es-errors/type'); -var IsPropertyKey = require('./IsPropertyKey'); +var isPropertyKey = require('../helpers/isPropertyKey'); var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); -var Type = require('./Type'); +var isObject = require('../helpers/isObject'); + // https://262.ecma-international.org/6.0/#sec-createdataproperty module.exports = function CreateDataProperty(O, P, V) { - if (Type(O) !== 'Object') { + if (!isObject(O)) { throw new $TypeError('Assertion failed: Type(O) is not Object'); } - if (!IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + if (!isPropertyKey(P)) { + throw new $TypeError('Assertion failed: P is not a Property Key'); } var newDesc = { '[[Configurable]]': true, '[[Enumerable]]': true, '[[Value]]': V,