Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2024-09-16 17:29:58 +00:00
parent 1afca056e3
commit 6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions

View file

@ -1,10 +1,6 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = GetIntrinsic('%TypeError%');
var Type = require('./Type');
var $TypeError = require('es-errors/type');
var isInteger = require('../helpers/isInteger');
@ -14,7 +10,7 @@ var $slice = callBound('String.prototype.slice');
// https://262.ecma-international.org/12.0/#substring
module.exports = function substring(S, inclusiveStart, exclusiveEnd) {
if (Type(S) !== 'String' || !isInteger(inclusiveStart) || (arguments.length > 2 && !isInteger(exclusiveEnd))) {
if (typeof S !== 'string' || !isInteger(inclusiveStart) || (arguments.length > 2 && !isInteger(exclusiveEnd))) {
throw new $TypeError('`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers');
}
return $slice(S, inclusiveStart, arguments.length > 2 ? exclusiveEnd : S.length);