Ignore:
Timestamp:
01/21/25 03:08:24 (3 days ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
0c6b92a
Message:

F4 Finalna Verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/es-abstract/2023/RegExpExec.js

    r0c6b92a r79a0317  
    33var $TypeError = require('es-errors/type');
    44
    5 var regexExec = require('call-bind/callBound')('RegExp.prototype.exec');
     5var regexExec = require('call-bound')('RegExp.prototype.exec');
    66
    77var Call = require('./Call');
    88var Get = require('./Get');
    99var IsCallable = require('./IsCallable');
    10 var Type = require('./Type');
     10
     11var isObject = require('../helpers/isObject');
    1112
    1213// https://262.ecma-international.org/6.0/#sec-regexpexec
    1314
    1415module.exports = function RegExpExec(R, S) {
    15         if (Type(R) !== 'Object') {
     16        if (!isObject(R)) {
    1617                throw new $TypeError('Assertion failed: `R` must be an Object');
    1718        }
     
    2223        if (IsCallable(exec)) {
    2324                var result = Call(exec, R, [S]);
    24                 if (typeof result === 'object') {
     25                if (result === null || isObject(result)) {
    2526                        return result;
    2627                }
Note: See TracChangeset for help on using the changeset viewer.