Update checked-in dependencies
This commit is contained in:
parent
1afca056e3
commit
6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions
8
node_modules/es-abstract/2020/RegExpExec.js
generated
vendored
8
node_modules/es-abstract/2020/RegExpExec.js
generated
vendored
|
|
@ -1,8 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $TypeError = require('es-errors/type');
|
||||
|
||||
var regexExec = require('call-bind/callBound')('RegExp.prototype.exec');
|
||||
|
||||
|
|
@ -17,13 +15,13 @@ module.exports = function RegExpExec(R, S) {
|
|||
if (Type(R) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: `R` must be an Object');
|
||||
}
|
||||
if (Type(S) !== 'String') {
|
||||
if (typeof S !== 'string') {
|
||||
throw new $TypeError('Assertion failed: `S` must be a String');
|
||||
}
|
||||
var exec = Get(R, 'exec');
|
||||
if (IsCallable(exec)) {
|
||||
var result = Call(exec, R, [S]);
|
||||
if (result === null || Type(result) === 'Object') {
|
||||
if (typeof result === 'object') {
|
||||
return result;
|
||||
}
|
||||
throw new $TypeError('"exec" method must return `null` or an Object');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue