Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2024/GetSubstitution.js
r0c6b92a r79a0317 2 2 3 3 var $TypeError = require('es-errors/type'); 4 4 var inspect = require('object-inspect'); 5 var isInteger = require('math-intrinsics/isInteger'); 5 6 var regexTester = require('safe-regex-test'); 6 var every = require('../helpers/every');7 8 var inspect = require('object-inspect');9 7 10 8 var Get = require('./Get'); … … 15 13 var substring = require('./substring'); 16 14 var ToString = require('./ToString'); 17 var Type = require('./Type');18 15 19 var isInteger = require('../helpers/isInteger'); 16 var every = require('../helpers/every'); 17 var isObject = require('../helpers/isObject'); 18 var isPrefixOf = require('../helpers/isPrefixOf'); 20 19 var isStringOrUndefined = require('../helpers/isStringOrUndefined'); 21 var isPrefixOf = require('../helpers/isPrefixOf');22 20 23 21 var startsWithDollarDigit = regexTester(/^\$[0-9]/); … … 44 42 } 45 43 46 if (typeof namedCaptures !== 'undefined' && Type(namedCaptures) !== 'Object') {44 if (typeof namedCaptures !== 'undefined' && !isObject(namedCaptures)) { 47 45 throw new $TypeError('Assertion failed: `namedCaptures` must be `undefined` or an Object'); 48 46 } … … 125 123 ref = substring(templateRemainder, 0, gtPos + 1); // step 5.g.iii.1 126 124 var groupName = substring(templateRemainder, 2, gtPos); // step 5.g.iii.2 127 if ( Type(namedCaptures) !== 'Object') {125 if (!isObject(namedCaptures)) { 128 126 throw new $TypeError('Assertion failed: Type(namedCaptures) is not Object'); // step 5.g.iii.3 129 127 }
Note:
See TracChangeset
for help on using the changeset viewer.