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/2023/substring.js
generated
vendored
8
node_modules/es-abstract/2023/substring.js
generated
vendored
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue