@@ -40,7 +40,7 @@ var Boolean = require( '@stdlib/boolean-ctor' );
40
40
var getter = require ( '@stdlib/array-base-getter' ) ;
41
41
var floor = require ( '@stdlib/math-base-special-floor' ) ;
42
42
var accessorGetter = require ( '@stdlib/array-base-accessor-getter' ) ;
43
- var format = require ( '@stdlib/string-format ' ) ;
43
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
44
44
var fromIterator = require ( './from_iterator.js' ) ;
45
45
var fromIteratorMap = require ( './from_iterator_map.js' ) ;
46
46
var fromArray = require ( './from_array.js' ) ;
@@ -180,37 +180,37 @@ function BooleanArray() {
180
180
buf = new Uint8Array ( arg ) ;
181
181
} else if ( isObject ( arg ) ) {
182
182
if ( HAS_ITERATOR_SYMBOL === false ) {
183
- throw new TypeError ( format ( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`. ' , arg ) ) ;
183
+ throw new TypeError ( format ( 'null29 ' , arg ) ) ;
184
184
}
185
185
if ( ! isFunction ( arg [ ITERATOR_SYMBOL ] ) ) {
186
- throw new TypeError ( format ( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`. ' , arg ) ) ;
186
+ throw new TypeError ( format ( 'null2A ' , arg ) ) ;
187
187
}
188
188
buf = arg [ ITERATOR_SYMBOL ] ( ) ;
189
189
if ( ! isFunction ( buf . next ) ) {
190
- throw new TypeError ( format ( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`. ' , arg ) ) ;
190
+ throw new TypeError ( format ( 'null2A ' , arg ) ) ;
191
191
}
192
192
buf = new Uint8Array ( fromIterator ( buf ) ) ;
193
193
} else {
194
- throw new TypeError ( format ( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`. ' , arg ) ) ;
194
+ throw new TypeError ( format ( 'null2A ' , arg ) ) ;
195
195
}
196
196
} else {
197
197
buf = arguments [ 0 ] ;
198
198
if ( ! isArrayBuffer ( buf ) ) {
199
- throw new TypeError ( format ( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`. ' , buf ) ) ;
199
+ throw new TypeError ( format ( 'null2B ' , buf ) ) ;
200
200
}
201
201
byteOffset = arguments [ 1 ] ;
202
202
if ( ! isNonNegativeInteger ( byteOffset ) ) {
203
- throw new TypeError ( format ( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`. ' , byteOffset ) ) ;
203
+ throw new TypeError ( format ( 'null2C ' , byteOffset ) ) ;
204
204
}
205
205
if ( nargs === 2 ) {
206
206
buf = new Uint8Array ( buf , byteOffset ) ;
207
207
} else {
208
208
len = arguments [ 2 ] ;
209
209
if ( ! isNonNegativeInteger ( len ) ) {
210
- throw new TypeError ( format ( 'invalid argument. Length must be a nonnegative integer. Value: `%s`. ' , len ) ) ;
210
+ throw new TypeError ( format ( 'null2F ' , len ) ) ;
211
211
}
212
212
if ( ( len * BYTES_PER_ELEMENT ) > ( buf . byteLength - byteOffset ) ) {
213
- throw new RangeError ( format ( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`. ' , len * BYTES_PER_ELEMENT ) ) ;
213
+ throw new RangeError ( format ( 'null2G ' , len * BYTES_PER_ELEMENT ) ) ;
214
214
}
215
215
buf = new Uint8Array ( buf , byteOffset , len ) ;
216
216
}
@@ -295,7 +295,7 @@ setReadOnly( BooleanArray, 'from', function from( src ) {
295
295
var len ;
296
296
var i ;
297
297
if ( ! isFunction ( this ) ) {
298
- throw new TypeError ( 'invalid invocation. `this` context must be a constructor.' ) ;
298
+ throw new TypeError ( format ( 'null01' ) ) ;
299
299
}
300
300
if ( ! isBooleanArrayConstructor ( this ) ) {
301
301
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
@@ -304,7 +304,7 @@ setReadOnly( BooleanArray, 'from', function from( src ) {
304
304
if ( nargs > 1 ) {
305
305
clbk = arguments [ 1 ] ;
306
306
if ( ! isFunction ( clbk ) ) {
307
- throw new TypeError ( format ( 'invalid argument. Second argument must be a function. Value: `%s`. ' , clbk ) ) ;
307
+ throw new TypeError ( format ( 'null2H ' , clbk ) ) ;
308
308
}
309
309
if ( nargs > 2 ) {
310
310
thisArg = arguments [ 2 ] ;
@@ -330,7 +330,7 @@ setReadOnly( BooleanArray, 'from', function from( src ) {
330
330
if ( isObject ( src ) && HAS_ITERATOR_SYMBOL && isFunction ( src [ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len
331
331
buf = src [ ITERATOR_SYMBOL ] ( ) ;
332
332
if ( ! isFunction ( buf . next ) ) {
333
- throw new TypeError ( format ( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`. ' , src ) ) ;
333
+ throw new TypeError ( format ( 'null2J ' , src ) ) ;
334
334
}
335
335
if ( clbk ) {
336
336
tmp = fromIteratorMap ( buf , clbk , thisArg ) ;
@@ -345,7 +345,7 @@ setReadOnly( BooleanArray, 'from', function from( src ) {
345
345
}
346
346
return out ;
347
347
}
348
- throw new TypeError ( format ( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`. ' , src ) ) ;
348
+ throw new TypeError ( format ( 'null2J ' , src ) ) ;
349
349
} ) ;
350
350
351
351
/**
@@ -370,7 +370,7 @@ setReadOnly( BooleanArray, 'of', function of() {
370
370
var args ;
371
371
var i ;
372
372
if ( ! isFunction ( this ) ) {
373
- throw new TypeError ( 'invalid invocation. `this` context must be a constructor.' ) ;
373
+ throw new TypeError ( format ( 'null01' ) ) ;
374
374
}
375
375
if ( ! isBooleanArrayConstructor ( this ) ) {
376
376
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
@@ -417,7 +417,7 @@ setReadOnly( BooleanArray.prototype, 'at', function at( idx ) {
417
417
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
418
418
}
419
419
if ( ! isInteger ( idx ) ) {
420
- throw new TypeError ( format ( 'invalid argument. Must provide an integer. Value: `%s`. ' , idx ) ) ;
420
+ throw new TypeError ( format ( 'null8A ' , idx ) ) ;
421
421
}
422
422
len = this . _length ;
423
423
buf = this . _buffer ;
@@ -685,7 +685,7 @@ setReadOnly( BooleanArray.prototype, 'every', function every( predicate, thisArg
685
685
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
686
686
}
687
687
if ( ! isFunction ( predicate ) ) {
688
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , predicate ) ) ;
688
+ throw new TypeError ( format ( 'null3c ' , predicate ) ) ;
689
689
}
690
690
buf = this . _buffer ;
691
691
for ( i = 0 ; i < this . _length ; i ++ ) {
@@ -741,7 +741,7 @@ setReadOnly( BooleanArray.prototype, 'fill', function fill( value, start, end )
741
741
len = this . _length ;
742
742
if ( arguments . length > 1 ) {
743
743
if ( ! isInteger ( start ) ) {
744
- throw new TypeError ( format ( 'invalid argument. Second argument must be an integer. Value: `%s`. ' , start ) ) ;
744
+ throw new TypeError ( format ( 'null7f ' , start ) ) ;
745
745
}
746
746
if ( start < 0 ) {
747
747
start += len ;
@@ -751,7 +751,7 @@ setReadOnly( BooleanArray.prototype, 'fill', function fill( value, start, end )
751
751
}
752
752
if ( arguments . length > 2 ) {
753
753
if ( ! isInteger ( end ) ) {
754
- throw new TypeError ( format ( 'invalid argument. Third argument must be an integer. Value: `%s`. ' , end ) ) ;
754
+ throw new TypeError ( format ( 'null2z ' , end ) ) ;
755
755
}
756
756
if ( end < 0 ) {
757
757
end += len ;
@@ -825,7 +825,7 @@ setReadOnly( BooleanArray.prototype, 'filter', function filter( predicate, thisA
825
825
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
826
826
}
827
827
if ( ! isFunction ( predicate ) ) {
828
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , predicate ) ) ;
828
+ throw new TypeError ( format ( 'null3c ' , predicate ) ) ;
829
829
}
830
830
buf = this . _buffer ;
831
831
out = [ ] ;
@@ -873,7 +873,7 @@ setReadOnly( BooleanArray.prototype, 'find', function find( predicate, thisArg )
873
873
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
874
874
}
875
875
if ( ! isFunction ( predicate ) ) {
876
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , predicate ) ) ;
876
+ throw new TypeError ( format ( 'null3c ' , predicate ) ) ;
877
877
}
878
878
buf = this . _buffer ;
879
879
for ( i = 0 ; i < this . _length ; i ++ ) {
@@ -919,7 +919,7 @@ setReadOnly( BooleanArray.prototype, 'findIndex', function findIndex( predicate,
919
919
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
920
920
}
921
921
if ( ! isFunction ( predicate ) ) {
922
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , predicate ) ) ;
922
+ throw new TypeError ( format ( 'null3c ' , predicate ) ) ;
923
923
}
924
924
buf = this . _buffer ;
925
925
for ( i = 0 ; i < this . _length ; i ++ ) {
@@ -966,7 +966,7 @@ setReadOnly( BooleanArray.prototype, 'findLast', function findLast( predicate, t
966
966
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
967
967
}
968
968
if ( ! isFunction ( predicate ) ) {
969
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , predicate ) ) ;
969
+ throw new TypeError ( format ( 'null3c ' , predicate ) ) ;
970
970
}
971
971
buf = this . _buffer ;
972
972
for ( i = this . _length - 1 ; i >= 0 ; i -- ) {
@@ -1012,7 +1012,7 @@ setReadOnly( BooleanArray.prototype, 'findLastIndex', function findLastIndex( pr
1012
1012
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
1013
1013
}
1014
1014
if ( ! isFunction ( predicate ) ) {
1015
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , predicate ) ) ;
1015
+ throw new TypeError ( format ( 'null3c ' , predicate ) ) ;
1016
1016
}
1017
1017
buf = this . _buffer ;
1018
1018
for ( i = this . _length - 1 ; i >= 0 ; i -- ) {
@@ -1056,7 +1056,7 @@ setReadOnly( BooleanArray.prototype, 'forEach', function forEach( fcn, thisArg )
1056
1056
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
1057
1057
}
1058
1058
if ( ! isFunction ( fcn ) ) {
1059
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , fcn ) ) ;
1059
+ throw new TypeError ( format ( 'null3c ' , fcn ) ) ;
1060
1060
}
1061
1061
buf = this . _buffer ;
1062
1062
for ( i = 0 ; i < this . _length ; i ++ ) {
@@ -1094,7 +1094,7 @@ setReadOnly( BooleanArray.prototype, 'get', function get( idx ) {
1094
1094
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
1095
1095
}
1096
1096
if ( ! isNonNegativeInteger ( idx ) ) {
1097
- throw new TypeError ( format ( 'invalid argument. Must provide a nonnegative integer. Value: `%s`. ' , idx ) ) ;
1097
+ throw new TypeError ( format ( 'null2K ' , idx ) ) ;
1098
1098
}
1099
1099
if ( idx >= this . _length ) {
1100
1100
return ;
@@ -1142,7 +1142,7 @@ setReadOnly( BooleanArray.prototype, 'includes', function includes( searchElemen
1142
1142
}
1143
1143
if ( arguments . length > 1 ) {
1144
1144
if ( ! isInteger ( fromIndex ) ) {
1145
- throw new TypeError ( format ( 'invalid argument. Second argument must be an integer. Value: `%s`. ' , fromIndex ) ) ;
1145
+ throw new TypeError ( format ( 'null7f ' , fromIndex ) ) ;
1146
1146
}
1147
1147
if ( fromIndex < 0 ) {
1148
1148
fromIndex += this . _length ;
@@ -1205,7 +1205,7 @@ setReadOnly( BooleanArray.prototype, 'indexOf', function indexOf( searchElement,
1205
1205
}
1206
1206
if ( arguments . length > 1 ) {
1207
1207
if ( ! isInteger ( fromIndex ) ) {
1208
- throw new TypeError ( format ( 'invalid argument. Second argument must be an integer. Value: `%s`. ' , fromIndex ) ) ;
1208
+ throw new TypeError ( format ( 'null7f ' , fromIndex ) ) ;
1209
1209
}
1210
1210
if ( fromIndex < 0 ) {
1211
1211
fromIndex += this . _length ;
@@ -1259,7 +1259,7 @@ setReadOnly( BooleanArray.prototype, 'join', function join( separator ) {
1259
1259
}
1260
1260
if ( arguments . length > 0 ) {
1261
1261
if ( ! isString ( separator ) ) {
1262
- throw new TypeError ( format ( 'invalid argument. First argument must be a string. Value: `%s`. ' , separator ) ) ;
1262
+ throw new TypeError ( format ( 'null3F ' , separator ) ) ;
1263
1263
}
1264
1264
} else {
1265
1265
separator = ',' ;
@@ -1421,7 +1421,7 @@ setReadOnly( BooleanArray.prototype, 'lastIndexOf', function lastIndexOf( search
1421
1421
}
1422
1422
if ( arguments . length > 1 ) {
1423
1423
if ( ! isInteger ( fromIndex ) ) {
1424
- throw new TypeError ( format ( 'invalid argument. Second argument must be an integer. Value: `%s`. ' , fromIndex ) ) ;
1424
+ throw new TypeError ( format ( 'null7f ' , fromIndex ) ) ;
1425
1425
}
1426
1426
if ( fromIndex >= this . _length ) {
1427
1427
fromIndex = this . _length - 1 ;
@@ -1502,7 +1502,7 @@ setReadOnly( BooleanArray.prototype, 'map', function map( fcn, thisArg ) {
1502
1502
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
1503
1503
}
1504
1504
if ( ! isFunction ( fcn ) ) {
1505
- throw new TypeError ( 'invalid argument. First argument must be a function. Value: `%s`.' , fcn ) ;
1505
+ throw new TypeError ( format ( 'null3c' ) , fcn ) ;
1506
1506
}
1507
1507
buf = this . _buffer ;
1508
1508
out = new this . constructor ( this . _length ) ;
@@ -1552,7 +1552,7 @@ setReadOnly( BooleanArray.prototype, 'reduce', function reduce( reducer, initial
1552
1552
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
1553
1553
}
1554
1554
if ( ! isFunction ( reducer ) ) {
1555
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , reducer ) ) ;
1555
+ throw new TypeError ( format ( 'null3c ' , reducer ) ) ;
1556
1556
}
1557
1557
buf = this . _buffer ;
1558
1558
len = this . _length ;
@@ -1611,7 +1611,7 @@ setReadOnly( BooleanArray.prototype, 'reduceRight', function reduceRight( reduce
1611
1611
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
1612
1612
}
1613
1613
if ( ! isFunction ( reducer ) ) {
1614
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , reducer ) ) ;
1614
+ throw new TypeError ( format ( 'null3c ' , reducer ) ) ;
1615
1615
}
1616
1616
buf = this . _buffer ;
1617
1617
len = this . _length ;
@@ -1742,15 +1742,15 @@ setReadOnly( BooleanArray.prototype, 'set', function set( value ) {
1742
1742
if ( arguments . length > 1 ) {
1743
1743
idx = arguments [ 1 ] ;
1744
1744
if ( ! isNonNegativeInteger ( idx ) ) {
1745
- throw new TypeError ( format ( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`. ' , idx ) ) ;
1745
+ throw new TypeError ( format ( 'null2L ' , idx ) ) ;
1746
1746
}
1747
1747
} else {
1748
1748
idx = 0 ;
1749
1749
}
1750
1750
if ( isCollection ( value ) ) {
1751
1751
N = value . length ;
1752
1752
if ( idx + N > this . _length ) {
1753
- throw new RangeError ( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' ) ;
1753
+ throw new RangeError ( format ( 'null03' ) ) ;
1754
1754
}
1755
1755
if ( isBooleanArray ( value ) ) {
1756
1756
sbuf = value . _buffer ; // eslint-disable-line no-underscore-dangle
@@ -1779,7 +1779,7 @@ setReadOnly( BooleanArray.prototype, 'set', function set( value ) {
1779
1779
return ;
1780
1780
}
1781
1781
if ( idx >= this . _length ) {
1782
- throw new RangeError ( format ( 'invalid argument. Index argument is out-of-bounds. Value: `%u`. ' , idx ) ) ;
1782
+ throw new RangeError ( format ( 'null2M ' , idx ) ) ;
1783
1783
}
1784
1784
buf [ idx ] = ( value ) ? 1 : 0 ;
1785
1785
} ) ;
@@ -1848,7 +1848,7 @@ setReadOnly( BooleanArray.prototype, 'slice', function slice( begin, end ) {
1848
1848
end = len ;
1849
1849
} else {
1850
1850
if ( ! isInteger ( begin ) ) {
1851
- throw new TypeError ( format ( 'invalid argument. First argument must be an integer. Value: `%s`. ' , begin ) ) ;
1851
+ throw new TypeError ( format ( 'null7e ' , begin ) ) ;
1852
1852
}
1853
1853
if ( begin < 0 ) {
1854
1854
begin += len ;
@@ -1860,7 +1860,7 @@ setReadOnly( BooleanArray.prototype, 'slice', function slice( begin, end ) {
1860
1860
end = len ;
1861
1861
} else {
1862
1862
if ( ! isInteger ( end ) ) {
1863
- throw new TypeError ( format ( 'invalid argument. Second argument must be an integer. Value: `%s`. ' , end ) ) ;
1863
+ throw new TypeError ( format ( 'null7f ' , end ) ) ;
1864
1864
}
1865
1865
if ( end < 0 ) {
1866
1866
end += len ;
@@ -1919,7 +1919,7 @@ setReadOnly( BooleanArray.prototype, 'some', function some( predicate, thisArg )
1919
1919
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
1920
1920
}
1921
1921
if ( ! isFunction ( predicate ) ) {
1922
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , predicate ) ) ;
1922
+ throw new TypeError ( format ( 'null3c ' , predicate ) ) ;
1923
1923
}
1924
1924
buf = this . _buffer ;
1925
1925
for ( i = 0 ; i < this . _length ; i ++ ) {
@@ -1984,7 +1984,7 @@ setReadOnly( BooleanArray.prototype, 'sort', function sort( compareFcn ) {
1984
1984
return this ;
1985
1985
}
1986
1986
if ( ! isFunction ( compareFcn ) ) {
1987
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , compareFcn ) ) ;
1987
+ throw new TypeError ( format ( 'null3c ' , compareFcn ) ) ;
1988
1988
}
1989
1989
buf . sort ( compare ) ;
1990
1990
return this ;
@@ -2063,7 +2063,7 @@ setReadOnly( BooleanArray.prototype, 'subarray', function subarray( begin, end )
2063
2063
end = len ;
2064
2064
} else {
2065
2065
if ( ! isInteger ( begin ) ) {
2066
- throw new TypeError ( format ( 'invalid argument. First argument must be an integer. Value: `%s`. ' , begin ) ) ;
2066
+ throw new TypeError ( format ( 'null7e ' , begin ) ) ;
2067
2067
}
2068
2068
if ( begin < 0 ) {
2069
2069
begin += len ;
@@ -2075,7 +2075,7 @@ setReadOnly( BooleanArray.prototype, 'subarray', function subarray( begin, end )
2075
2075
end = len ;
2076
2076
} else {
2077
2077
if ( ! isInteger ( end ) ) {
2078
- throw new TypeError ( format ( 'invalid argument. Second argument must be an integer. Value: `%s`. ' , end ) ) ;
2078
+ throw new TypeError ( format ( 'null7f ' , end ) ) ;
2079
2079
}
2080
2080
if ( end < 0 ) {
2081
2081
end += len ;
@@ -2145,7 +2145,7 @@ setReadOnly( BooleanArray.prototype, 'toLocaleString', function toLocaleString(
2145
2145
} else if ( isObject ( options ) ) {
2146
2146
opts = options ;
2147
2147
} else {
2148
- throw new TypeError ( format ( 'invalid argument. Options argument must be an object. Value: `%s`. ' , options ) ) ;
2148
+ throw new TypeError ( format ( 'null2V ' , options ) ) ;
2149
2149
}
2150
2150
buf = this . _buffer ;
2151
2151
out = [ ] ;
@@ -2268,7 +2268,7 @@ setReadOnly( BooleanArray.prototype, 'toSorted', function toSorted( compareFcn )
2268
2268
return out ;
2269
2269
}
2270
2270
if ( ! isFunction ( compareFcn ) ) {
2271
- throw new TypeError ( format ( 'invalid argument. First argument must be a function. Value: `%s`. ' , compareFcn ) ) ;
2271
+ throw new TypeError ( format ( 'null3c ' , compareFcn ) ) ;
2272
2272
}
2273
2273
outbuf . sort ( compare ) ;
2274
2274
return out ;
@@ -2464,17 +2464,17 @@ setReadOnly( BooleanArray.prototype, 'with', function copyWith( index, value ) {
2464
2464
throw new TypeError ( 'invalid invocation. `this` is not a boolean array.' ) ;
2465
2465
}
2466
2466
if ( ! isInteger ( index ) ) {
2467
- throw new TypeError ( format ( 'invalid argument. First argument must be an integer. Value: `%s`. ' , index ) ) ;
2467
+ throw new TypeError ( format ( 'null7e ' , index ) ) ;
2468
2468
}
2469
2469
len = this . _length ;
2470
2470
if ( index < 0 ) {
2471
2471
index += len ;
2472
2472
}
2473
2473
if ( index < 0 || index >= len ) {
2474
- throw new RangeError ( format ( 'invalid argument. Index argument is out-of-bounds. Value: `%s`. ' , index ) ) ;
2474
+ throw new RangeError ( format ( 'nullFP ' , index ) ) ;
2475
2475
}
2476
2476
if ( ! isBoolean ( value ) ) {
2477
- throw new TypeError ( format ( 'invalid argument. Second argument must be a boolean. Value: `%s`. ' , value ) ) ;
2477
+ throw new TypeError ( format ( 'null55 ' , value ) ) ;
2478
2478
}
2479
2479
out = new this . constructor ( this . _buffer ) ;
2480
2480
buf = out . _buffer ; // eslint-disable-line no-underscore-dangle
0 commit comments