File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 23
23
var isCollection = require ( '@stdlib/assert-is-collection' ) ;
24
24
var isInteger = require ( '@stdlib/assert-is-integer' ) . isPrimitive ;
25
25
var base = require ( '@stdlib/array-base-slice' ) ;
26
- var format = require ( '@stdlib/string-format ' ) ;
26
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
27
27
28
28
29
29
// MAIN //
@@ -64,17 +64,17 @@ function slice( x ) {
64
64
var end ;
65
65
66
66
if ( ! isCollection ( x ) ) {
67
- throw new TypeError ( format ( 'invalid argument. First argument must be an array-like object. Value: `%s`. ' , x ) ) ;
67
+ throw new TypeError ( format ( '1pF2O ' , x ) ) ;
68
68
}
69
69
if ( arguments . length > 1 ) {
70
70
start = arguments [ 1 ] ;
71
71
if ( ! isInteger ( start ) ) {
72
- throw new TypeError ( format ( 'invalid argument. Second argument must be an integer. Value: `%s`. ' , start ) ) ;
72
+ throw new TypeError ( format ( '1pF7f ' , start ) ) ;
73
73
}
74
74
if ( arguments . length > 2 ) {
75
75
end = arguments [ 2 ] ;
76
76
if ( ! isInteger ( end ) ) {
77
- throw new TypeError ( format ( 'invalid argument. Third argument must be an integer. Value: `%s`. ' , end ) ) ;
77
+ throw new TypeError ( format ( '1pF2z ' , end ) ) ;
78
78
}
79
79
} else {
80
80
end = x . length ;
Original file line number Diff line number Diff line change 40
40
"@stdlib/array-base-slice" : " ^0.2.1" ,
41
41
"@stdlib/assert-is-collection" : " ^0.2.1" ,
42
42
"@stdlib/assert-is-integer" : " ^0.2.1" ,
43
- "@stdlib/string-format " : " ^0.2.1" ,
43
+ "@stdlib/error-tools-fmtprodmsg " : " ^0.2.1" ,
44
44
"@stdlib/types" : " ^0.3.2" ,
45
45
"@stdlib/error-tools-fmtprodmsg" : " ^0.2.1"
46
46
},
You can’t perform that action at this time.
0 commit comments