Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2019/StringGetOwnProperty.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 $charAt = callBound('String.prototype.charAt'); 7 7 var $stringToString = callBound('String.prototype.toString'); … … 9 9 var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); 10 10 var IsInteger = require('./IsInteger'); 11 var IsPropertyKey = require('./IsPropertyKey');12 var Type = require('./Type');13 11 14 var isNegativeZero = require('is-negative-zero'); 12 var isObject = require('../helpers/isObject'); 13 var isPropertyKey = require('../helpers/isPropertyKey'); 14 15 var isNegativeZero = require('math-intrinsics/isNegativeZero'); 15 16 16 17 // https://262.ecma-international.org/8.0/#sec-stringgetownproperty … … 18 19 module.exports = function StringGetOwnProperty(S, P) { 19 20 var str; 20 if ( Type(S) === 'Object') {21 if (isObject(S)) { 21 22 try { 22 23 str = $stringToString(S); … … 26 27 throw new $TypeError('Assertion failed: `S` must be a boxed string object'); 27 28 } 28 if (! IsPropertyKey(P)) {29 throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');29 if (!isPropertyKey(P)) { 30 throw new $TypeError('Assertion failed: P is not a Property Key'); 30 31 } 31 32 if (typeof P !== 'string') {
Note:
See TracChangeset
for help on using the changeset viewer.