Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2021/StringGetOwnProperty.js
r0c6b92a r79a0317 2 2 3 3 var $TypeError = require('es-errors/type'); 4 var isNegativeZero = require('math-intrinsics/isNegativeZero'); 4 5 5 var callBound = require('call-b ind/callBound');6 var callBound = require('call-bound'); 6 7 var $charAt = callBound('String.prototype.charAt'); 7 8 var $stringToString = callBound('String.prototype.toString'); … … 9 10 var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); 10 11 var IsIntegralNumber = require('./IsIntegralNumber'); 11 var IsPropertyKey = require('./IsPropertyKey');12 var Type = require('./Type');13 12 14 var isNegativeZero = require('is-negative-zero'); 13 var isObject = require('../helpers/isObject'); 14 var isPropertyKey = require('../helpers/isPropertyKey'); 15 15 16 16 // https://262.ecma-international.org/12.0/#sec-stringgetownproperty … … 18 18 module.exports = function StringGetOwnProperty(S, P) { 19 19 var str; 20 if ( Type(S) === 'Object') {20 if (isObject(S)) { 21 21 try { 22 22 str = $stringToString(S); … … 26 26 throw new $TypeError('Assertion failed: `S` must be a boxed string object'); 27 27 } 28 if (! IsPropertyKey(P)) {29 throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');28 if (!isPropertyKey(P)) { 29 throw new $TypeError('Assertion failed: P is not a Property Key'); 30 30 } 31 31 if (typeof P !== 'string') {
Note:
See TracChangeset
for help on using the changeset viewer.