File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ var isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).is
2424var ctors = require ( '@stdlib/array-ctors' ) ;
2525var afill = require ( '@stdlib/array-base-filled' ) ;
2626var gfill = require ( '@stdlib/blas-ext-base-gfill' ) ;
27+ var format = require ( '@stdlib/string-format' ) ;
2728
2829
2930// MAIN //
@@ -51,7 +52,7 @@ function full( length, value ) {
5152 var ctor ;
5253 var out ;
5354 if ( ! isNonNegativeInteger ( length ) ) {
54- throw new TypeError ( 'invalid argument. First argument must be a nonnegative integer. Value: `' + length + '`.' ) ;
55+ throw new TypeError ( format ( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.' , length ) ) ;
5556 }
5657 if ( arguments . length > 2 ) {
5758 dtype = arguments [ 2 ] ;
@@ -63,7 +64,7 @@ function full( length, value ) {
6364 }
6465 ctor = ctors ( dtype ) ;
6566 if ( ctor === null ) {
66- throw new TypeError ( 'invalid argument. Third argument must be a recognized data type. Value: `' + dtype + '`.' ) ;
67+ throw new TypeError ( format ( 'invalid argument. Third argument must be a recognized data type. Value: `%s`.' , dtype ) ) ;
6768 }
6869 out = new ctor ( length ) ;
6970
Original file line number Diff line number Diff line change 4141 "@stdlib/array-ctors" : " ^0.0.x" ,
4242 "@stdlib/assert-is-nonnegative-integer" : " ^0.0.x" ,
4343 "@stdlib/blas-ext-base-gfill" : " ^0.0.x" ,
44+ "@stdlib/string-format" : " ^0.0.x" ,
4445 "@stdlib/types" : " ^0.0.x"
4546 },
4647 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments