node_modules/es-abstract/2022/CreateMethodProperty.js in immosquare-cleaner-0.1.60 vs node_modules/es-abstract/2022/CreateMethodProperty.js in immosquare-cleaner-0.1.61
- old
+ new
@@ -4,22 +4,23 @@
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
-var IsPropertyKey = require('./IsPropertyKey');
+var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
-var Type = require('./Type');
+var isObject = require('../helpers/isObject');
+
// https://262.ecma-international.org/6.0/#sec-createmethodproperty
module.exports = function CreateMethodProperty(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]]': false,