Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions etc/eslint/rules/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@
* @default [ 'off', 'starred-block' ]
* @see [multiline-comment-style]{@link https://eslint.org/docs/rules/multiline-comment-style}
*/
rules[ 'multiline-comment-style' ] = [ 'off', 'starred-block' ]; // TODO: enable once non-"aligned" blocks are supported

Check warning on line 879 in etc/eslint/rules/style.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'todo' comment: 'TODO: enable once non-"aligned" blocks...'

/**
* Allow same line or multiline ternary expressions.
Expand Down Expand Up @@ -1368,9 +1368,15 @@
},

// path.extname
{

Check warning on line 1371 in etc/eslint/rules/style.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

File has too many lines (427). Maximum allowed is 300
'selector': 'CallExpression[callee.object.name="path"][callee.property.name="extname"]',
'message': 'Use `@stdlib/utils/extname` instead of path.extname.'
},

// format without interpolation

Check warning on line 1376 in etc/eslint/rules/style.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Comments should begin with an uppercase character
{
'selector': 'CallExpression[callee.name="format"][arguments.length=1][arguments.0.value=/^[^%]*$/]',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little tricky, as this supposes we never use format as an alias for something else which is not string interpolation. E.g., we could have a "format" function which does some other kind of formatting and does not operate on a formatting string, and devs will get spurious lint errors.

'message': 'Unnecessary `format` call. Remove `format` when a string does not contain interpolation placeholders.'
}
];

Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/array/mskfilter/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function mskfilter( x, mask ) {
throw new TypeError( format( 'invalid argument. Second argument must be an array-like object. Value: `%s`.', mask ) );
}
if ( x.length !== mask.length ) {
throw new Error( format( 'invalid arguments. Must provide equal length array-like objects.' ) );
throw new Error( 'invalid arguments. Must provide equal length array-like objects.' );
}
dt = dtype( x );
if ( dt === 'generic' || dt === null ) {
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/array/mskreject/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function mskreject( x, mask ) {
throw new TypeError( format( 'invalid argument. Second argument must be an array-like object. Value: `%s`.', mask ) );
}
if ( x.length !== mask.length ) {
throw new Error( format( 'invalid arguments. Must provide equal length array-like objects.' ) );
throw new Error( 'invalid arguments. Must provide equal length array-like objects.' );
}
dt = dtype( x );
if ( dt === 'generic' || dt === null ) {
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/array/struct-factory/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
var FIELDS;
var Struct;

// FIXME: add option support for strict input object validation (e.g., throw whenever non-struct properties are included on an object passed to `set`)

Check warning on line 143 in lib/node_modules/@stdlib/array/struct-factory/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'fixme' comment: 'FIXME: add option support for strict...'

if ( isCollection( arg ) ) {
Struct = structFactory( arg ); // NOTE: delegate to `structFactory` to perform input validation
Expand All @@ -150,7 +150,7 @@
throw new TypeError( format( 'invalid argument. First argument must be either a struct constructor or struct schema. Value: `%s`.', arg ) );
}
BYTES_PER_ELEMENT = Struct.byteLength;
LAYOUT = Struct.layout; // TODO: consider whether to lazily materialize the struct layout, as this could potentially be a long string (hence increased memory consumption) depending on the complexity of the struct

Check warning on line 153 in lib/node_modules/@stdlib/array/struct-factory/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'todo' comment: 'TODO: consider whether to lazily...'
FIELDS = Struct.fields;

/**
Expand Down Expand Up @@ -208,7 +208,7 @@
len = arg.length;
buf = fromArray( Struct, new ArrayBuffer( len*BYTES_PER_ELEMENT ), arg );
if ( buf === null ) {
throw new TypeError( format( 'invalid argument. Each element of a provided input array must be a valid object or a struct instance having the same layout as elements in the desired output array.' ) );
throw new TypeError( 'invalid argument. Each element of a provided input array must be a valid object or a struct instance having the same layout as elements in the desired output array.' );
}
}
// Case: new StructArray( ArrayBuffer )
Expand All @@ -235,7 +235,7 @@
len = tmp.length;
buf = fromArray( Struct, new ArrayBuffer( len*BYTES_PER_ELEMENT ), tmp );
if ( buf === null ) {
throw new TypeError( format( 'invalid argument. Each element of a provided input iterable must be either a valid object or a struct instance having the same layout as elements in the desired output array.' ) );
throw new TypeError( 'invalid argument. Each element of a provided input iterable must be either a valid object or a struct instance having the same layout as elements in the desired output array.' );
}
}
// Case: new StructArray( ???? )
Expand Down Expand Up @@ -492,7 +492,7 @@
sbuf.byteOffset+sbuf.byteLength > j
)
) {
// FIXME: add optimization when `value` is a StructArray sharing the same buffer and having the same layout; in which case, we can simply copy `src` bytes to a temporary array and then copy those bytes into the target array, without needing to intermediate struct instance materialization

Check warning on line 495 in lib/node_modules/@stdlib/array/struct-factory/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'fixme' comment: 'FIXME: add optimization when `value` is...'

// We need to copy source values...
tmp = [];
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/array/to-fancy/lib/prop2slice.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
* // returns false
*/
function isSubsequence( prop ) {
// TODO: consider whether to make this check more robust (e.g., should we actually throw if someone tries to access `foo:bar`? If we make this check more exact, how would we distinguish between a non-existent `foo:bar` property and an actual error in the subsequence string?)

Check warning on line 72 in lib/node_modules/@stdlib/array/to-fancy/lib/prop2slice.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'todo' comment: 'TODO: consider whether to make this...'
return RE_SUBSEQ.test( prop );
}

Expand Down Expand Up @@ -122,7 +122,7 @@
// NOTE: the following error check must come last due to fall-through when in non-strict mode...
if ( s.code === 'ERR_SLICE_OUT_OF_BOUNDS' ) {
if ( strict ) {
throw new RangeError( format( 'invalid operation. Slice exceeds array bounds.' ) );
throw new RangeError( 'invalid operation. Slice exceeds array bounds.' );
}
// Repeat parsing, this time allowing for out-of-bounds slices:
s = seq2slice( str, max, false );
Expand Down
3 changes: 1 addition & 2 deletions lib/node_modules/@stdlib/array/to-fancy/lib/resolve_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
// MODULES //

var normalizeIndex = require( '@stdlib/ndarray/base/normalize-index' );
var format = require( '@stdlib/string/format' );


// MAIN //
Expand Down Expand Up @@ -52,7 +51,7 @@ function resolveIndex( str, max, strict ) {
i = normalizeIndex( idx, max-1 );
if ( i === -1 ) {
if ( strict ) {
throw new RangeError( format( 'invalid operation. Index exceeds array bounds.' ) );
throw new RangeError( 'invalid operation. Index exceeds array bounds.' );
}
// Return the non-normalized index, as this should fallback to default property handling and returning "undefined":
return idx;
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ddot/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ function ddot( x, y ) {

// Validate that we've been provided non-zero-dimensional arrays...
if ( xsh.length < 1 ) {
throw new TypeError( format( 'invalid argument. First argument must have at least one dimension.' ) );
throw new TypeError( 'invalid argument. First argument must have at least one dimension.' );
}
if ( ysh.length < 1 ) {
throw new TypeError( format( 'invalid argument. Second argument must have at least one dimension.' ) );
throw new TypeError( 'invalid argument. Second argument must have at least one dimension.' );
}
// Validate that the dimension argument is a negative integer...
if ( arguments.length > 2 ) {
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/cusum/lib/assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function assign( x ) {
if ( isndarrayLike( v ) ) {
// As the operation is performed across all dimensions, `v` is assumed to be a zero-dimensional ndarray...
if ( ndims( v ) !== 0 ) {
throw new TypeError( format( 'invalid argument. Second argument must be a zero-dimensional ndarray.' ) );
throw new TypeError( 'invalid argument. Second argument must be a zero-dimensional ndarray.' );
}
return base( x, v, out );
}
Expand Down Expand Up @@ -142,7 +142,7 @@ function assign( x ) {
if ( hasOwnProp( opts, 'dims' ) ) {
v = maybeBroadcastArray( v, nonCoreShape( getShape( x ), opts.dims ) ); // eslint-disable-line max-len
} else if ( ndims( v ) !== 0 ) {
throw new TypeError( format( 'invalid argument. Second argument must be a zero-dimensional ndarray.' ) );
throw new TypeError( 'invalid argument. Second argument must be a zero-dimensional ndarray.' );
}
}
// Case: assign( x, initial_scalar, out, opts )
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/cusum/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function cusum( x ) {
if ( isndarrayLike( v ) ) {
// As the operation is performed across all dimensions, `v` must be a zero-dimensional ndarray...
if ( ndims( v ) !== 0 ) {
throw new TypeError( format( 'invalid argument. Second argument must be a zero-dimensional ndarray.' ) );
throw new TypeError( 'invalid argument. Second argument must be a zero-dimensional ndarray.' );
}
return base( x, v );
}
Expand All @@ -126,7 +126,7 @@ function cusum( x ) {
if ( hasOwnProp( opts, 'dims' ) ) {
v = maybeBroadcastArray( v, nonCoreShape( getShape( x ), opts.dims ) ); // eslint-disable-line max-len
} else if ( ndims( v ) !== 0 ) {
throw new TypeError( format( 'invalid argument. Second argument must be a zero-dimensional ndarray.' ) );
throw new TypeError( 'invalid argument. Second argument must be a zero-dimensional ndarray.' );
}
}
// Case: cusum( x, initial_scalar, opts )
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/sdot/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ function sdot( x, y ) {

// Validate that we've been provided non-zero-dimensional arrays...
if ( xsh.length < 1 ) {
throw new TypeError( format( 'invalid argument. First argument must have at least one dimension.' ) );
throw new TypeError( 'invalid argument. First argument must have at least one dimension.' );
}
if ( ysh.length < 1 ) {
throw new TypeError( format( 'invalid argument. Second argument must have at least one dimension.' ) );
throw new TypeError( 'invalid argument. Second argument must have at least one dimension.' );
}
// Validate that the dimension argument is a negative integer...
if ( arguments.length > 2 ) {
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/tools/swap-factory/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* var array = require( '@stdlib/ndarray/array' );
* var dswap = require( '@stdlib/blas/base/dswap' ).ndarray;
*
* var swap = factory( dswap, 'float64' );

Check warning on line 55 in lib/node_modules/@stdlib/blas/tools/swap-factory/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "dswap"
*
* var x = array( new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );
* var y = array( new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );
Expand Down Expand Up @@ -136,10 +136,10 @@

// Validate that we've been provided non-zero-dimensional arrays...
if ( xsh.length < 1 ) {
throw new TypeError( format( 'invalid argument. First argument must have at least one dimension.' ) );
throw new TypeError( 'invalid argument. First argument must have at least one dimension.' );
}
if ( ysh.length < 1 ) {
throw new TypeError( format( 'invalid argument. Second argument must have at least one dimension.' ) );
throw new TypeError( 'invalid argument. Second argument must have at least one dimension.' );
}
// Validate that the arrays have the same shape...
if ( !hasEqualValues( xsh, ysh ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@
throw new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', table ) );
}
if ( !isFunction( table.default ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "default" property and an associated method.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "default" property and an associated method.' );
}
if ( hasProp( table, 'types' ) && !isCollection( table.types ) && !isEmptyCollection( table.types ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "types" property whose associated value is an array-like object.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "types" property whose associated value is an array-like object.' );
}
if ( hasProp( table, 'fcns' ) && !isFunctionArray( table.fcns ) && !isEmptyCollection( table.fcns ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "fcns" property whose associated value is an array-like object containing functions.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "fcns" property whose associated value is an array-like object containing functions.' );

Check warning on line 137 in lib/node_modules/@stdlib/ndarray/base/binary-reduce-strided1d-dispatch/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "fcns"
}
if ( !isCollection( idtypes ) ) {
throw new TypeError( format( 'invalid argument. Second argument must be an array-like object. Value: `%s`.', idtypes ) );
Expand Down Expand Up @@ -422,7 +422,7 @@
* var y = new ndarray( 'generic', ybuf, [ ybuf.length ], [ 1 ], 0, 'row-major' );
*
* var zbuf = [ 0.0 ];
* var z = new ndarray( 'generic', zbuf, [], [ 0 ], 0, 'row-major' );

Check warning on line 425 in lib/node_modules/@stdlib/ndarray/base/binary-reduce-strided1d-dispatch/lib/main.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "zbuf"
*
* var out = dot.assign( x, y, z );
* // returns <ndarray>[ -5.0 ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ function createSourceFile( signature ) {
tmp = format( 'f( (%s)v )', ct1 );
}
} else { // e.g., c, z, f, d, b, etc
tmp = format( 'f( v )' );
tmp = 'f( v )';
}
file = replace( file, '{{CALLBACK_EXPRESSION_0D}}', tmp );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ function NullaryStrided1dDispatch( table, idtypes, odtypes, options ) {
throw new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', table ) );
}
if ( !isFunction( table.default ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "default" property and an associated method.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "default" property and an associated method.' );
}
if ( hasProp( table, 'types' ) && !isCollection( table.types ) && !isEmptyCollection( table.types ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "types" property whose associated value is an array-like object.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "types" property whose associated value is an array-like object.' );
}
if ( hasProp( table, 'fcns' ) && !isFunctionArray( table.fcns ) && !isEmptyCollection( table.fcns ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "fcns" property whose associated value is an array-like object containing functions.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "fcns" property whose associated value is an array-like object containing functions.' );
}
if ( !isCollection( idtypes ) ) {
throw new TypeError( format( 'invalid argument. Second argument must be an array-like object. Value: `%s`.', idtypes ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ function createSourceFile( signature ) {
tmp = format( '(%s)f()', dtype2c( t1 ) );
}
} else { // e.g., c, z, f, d, b, etc
tmp = format( 'f()' );
tmp = 'f()';
}
file = replace( file, '{{CALLBACK_EXPRESSION_0D}}', tmp );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ function UnaryStrided1dDispatchBy( table, idtypes, odtypes, policies ) {
throw new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', table ) );
}
if ( !isFunction( table.default ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "default" property and an associated method.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "default" property and an associated method.' );
}
if ( hasProp( table, 'types' ) && !isCollection( table.types ) && !isEmptyCollection( table.types ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "types" property whose associated value is an array-like object.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "types" property whose associated value is an array-like object.' );
}
if ( hasProp( table, 'fcns' ) && !isFunctionArray( table.fcns ) && !isEmptyCollection( table.fcns ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "fcns" property whose associated value is an array-like object containing functions.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "fcns" property whose associated value is an array-like object containing functions.' );
}
if ( !isCollection( idtypes ) ) {
throw new TypeError( format( 'invalid argument. Second argument must be an array-like object. Value: `%s`.', idtypes ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ function UnaryStrided1dDispatch( table, idtypes, odtypes, policies ) {
throw new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', table ) );
}
if ( !isFunction( table.default ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "default" property and an associated method.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "default" property and an associated method.' );
}
if ( hasProp( table, 'types' ) && !isCollection( table.types ) && !isEmptyCollection( table.types ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "types" property whose associated value is an array-like object.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "types" property whose associated value is an array-like object.' );
}
if ( hasProp( table, 'fcns' ) && !isFunctionArray( table.fcns ) && !isEmptyCollection( table.fcns ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "fcns" property whose associated value is an array-like object containing functions.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "fcns" property whose associated value is an array-like object containing functions.' );
}
if ( !isCollection( idtypes ) ) {
throw new TypeError( format( 'invalid argument. Second argument must be an array-like object. Value: `%s`.', idtypes ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ function UnaryStrided1dDispatch( table, idtypes, odtypes, policies, options ) {
throw new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', table ) );
}
if ( !isFunction( table.default ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "default" property and an associated method.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "default" property and an associated method.' );
}
if ( hasProp( table, 'types' ) && !isCollection( table.types ) && !isEmptyCollection( table.types ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "types" property whose associated value is an array-like object.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "types" property whose associated value is an array-like object.' );
}
if ( hasProp( table, 'fcns' ) && !isFunctionArray( table.fcns ) && !isEmptyCollection( table.fcns ) ) {
throw new TypeError( format( 'invalid argument. First argument must be an object having a "fcns" property whose associated value is an array-like object containing functions.' ) );
throw new TypeError( 'invalid argument. First argument must be an object having a "fcns" property whose associated value is an array-like object containing functions.' );
}
if ( !isCollection( idtypes ) ) {
throw new TypeError( format( 'invalid argument. Second argument must be an array-like object. Value: `%s`.', idtypes ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function nditerColumnEntries( x ) {
}
opts.writable = !options.readonly;
if ( opts.writable && isReadOnly( x ) ) {
throw new Error( format( 'invalid option. Cannot write to read-only array.' ) );
throw new Error( 'invalid option. Cannot write to read-only array.' );
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/ndarray/iter/columns/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function nditerColumns( x ) {
}
opts.writable = !options.readonly;
if ( opts.writable && isReadOnly( x ) ) {
throw new Error( format( 'invalid option. Cannot write to read-only array.' ) );
throw new Error( 'invalid option. Cannot write to read-only array.' );
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/ndarray/iter/matrices/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function nditerMatrices( x ) {
}
opts.writable = !options.readonly;
if ( opts.writable && isReadOnly( x ) ) {
throw new Error( format( 'invalid option. Cannot write to read-only array.' ) );
throw new Error( 'invalid option. Cannot write to read-only array.' );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function nditerMatrixEntries( x ) {
}
opts.writable = !options.readonly;
if ( opts.writable && isReadOnly( x ) ) {
throw new Error( format( 'invalid option. Cannot write to read-only array.' ) );
throw new Error( 'invalid option. Cannot write to read-only array.' );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function nditerRowEntries( x ) {
}
opts.writable = !options.readonly;
if ( opts.writable && isReadOnly( x ) ) {
throw new Error( format( 'invalid option. Cannot write to read-only array.' ) );
throw new Error( 'invalid option. Cannot write to read-only array.' );
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/ndarray/iter/rows/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function nditerRows( x ) {
}
opts.writable = !options.readonly;
if ( opts.writable && isReadOnly( x ) ) {
throw new Error( format( 'invalid option. Cannot write to read-only array.' ) );
throw new Error( 'invalid option. Cannot write to read-only array.' );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function nditerSelectDimension( x, dim ) {
}
opts.writable = !options.readonly;
if ( opts.writable && isReadOnly( x ) ) {
throw new Error( format( 'invalid option. Cannot write to read-only array.' ) );
throw new Error( 'invalid option. Cannot write to read-only array.' );
}
}
if ( hasOwnProp( options, 'keepdim' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/ndarray/iter/stacks/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function nditerStacks( x, dims ) {
}
opts.writable = !options.readonly;
if ( opts.writable && isReadOnly( x ) ) {
throw new Error( format( 'invalid option. Cannot write to read-only array.' ) );
throw new Error( 'invalid option. Cannot write to read-only array.' );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function nditerSubarrays( x, ndims ) {
}
opts.writable = !options.readonly;
if ( opts.writable && isReadOnly( x ) ) {
throw new Error( format( 'invalid option. Cannot write to read-only array.' ) );
throw new Error( 'invalid option. Cannot write to read-only array.' );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
// MODULES //

var normalizeIndex = require( '@stdlib/ndarray/base/normalize-index' );
var format = require( '@stdlib/string/format' );


// MAIN //
Expand Down Expand Up @@ -55,7 +54,7 @@ function resolveIndex( str, max, strict ) {
idx = parseInt( str, 10 );
i = normalizeIndex( idx, max-1 );
if ( i === -1 && strict ) {
throw new RangeError( format( 'invalid operation. Index exceeds ndarray bounds.' ) );
throw new RangeError( 'invalid operation. Index exceeds ndarray bounds.' );
}
return i;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/stats/array/mskmax/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function mskmax( x, mask ) {
throw new TypeError( format( 'invalid argument. Second argument must have one of the following data types: "%s". Data type: `%s`.', join( IDTYPES, '", "' ), dt ) );
}
if ( x.length !== mask.length ) {
throw new RangeError( format( 'invalid arguments. First and second arguments must have the same length.' ) );
throw new RangeError( 'invalid arguments. First and second arguments must have the same length.' );
}
return strided( x.length, x, 1, 0, mask, 1, 0 );
}
Expand Down
Loading