Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2023/RegExpExec.js
r0c6b92a r79a0317 3 3 var $TypeError = require('es-errors/type'); 4 4 5 var regexExec = require('call-b ind/callBound')('RegExp.prototype.exec');5 var regexExec = require('call-bound')('RegExp.prototype.exec'); 6 6 7 7 var Call = require('./Call'); 8 8 var Get = require('./Get'); 9 9 var IsCallable = require('./IsCallable'); 10 var Type = require('./Type'); 10 11 var isObject = require('../helpers/isObject'); 11 12 12 13 // https://262.ecma-international.org/6.0/#sec-regexpexec 13 14 14 15 module.exports = function RegExpExec(R, S) { 15 if ( Type(R) !== 'Object') {16 if (!isObject(R)) { 16 17 throw new $TypeError('Assertion failed: `R` must be an Object'); 17 18 } … … 22 23 if (IsCallable(exec)) { 23 24 var result = Call(exec, R, [S]); 24 if ( typeof result === 'object') {25 if (result === null || isObject(result)) { 25 26 return result; 26 27 }
Note:
See TracChangeset
for help on using the changeset viewer.