Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Apr 2, 2022
1 parent 6b89cfa commit fbc7dba
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/.keepalive

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/close_pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#/

# Workflow name:
name: Close Pull Requests
name: close_pull_requests

# Workflow triggers:
on:
Expand Down
2 changes: 1 addition & 1 deletion complex128/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ function Complex128Array() {
}
buf = buf[ ITERATOR_SYMBOL ]();
if ( !isFunction( buf.next ) ) {
throw new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable.' );
throw new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );
}
buf = fromIterator( buf );
if ( buf instanceof Error ) {
Expand Down
2 changes: 1 addition & 1 deletion complex64/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ function Complex64Array() {
}
buf = buf[ ITERATOR_SYMBOL ]();
if ( !isFunction( buf.next ) ) {
throw new TypeError( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable.' );
throw new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );
}
buf = fromIterator( buf );
if ( buf instanceof Error ) {
Expand Down
6 changes: 3 additions & 3 deletions datespace/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var rounders = [ 'floor', 'ceil', 'round' ];
* @param {*} value - value to be validated
* @param {string} name - name to be used in error messages
* @throws {TypeError} value must either be a date string, Date object, Unix timestamp, or JavaScript timestamp
* @throws {Error} numeric date must be either a Unix or Javascript timestamp
* @throws {Error} numeric date must be either a Unix or JavaScript timestamp
* @returns {Date} validated date
*/
function validDate( value, name ) {
Expand All @@ -61,7 +61,7 @@ function validDate( value, name ) {
}
if ( type === 'number' ) {
if ( !timestamp.test( value ) ) {
throw new Error( format( 'invalid argument. Numeric %s date must be either a Unix or Javascript timestamp.', name.toLowerCase() ) );
throw new Error( format( 'invalid argument. Numeric %s date must be either a Unix or JavaScript timestamp.', name.toLowerCase() ) );
}
if ( value.toString().length === 10 ) {
value *= 1000; // sec to ms
Expand Down Expand Up @@ -152,7 +152,7 @@ function datespace( start, stop, length, options ) {
throw new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'round', opts.round ) );
}
if ( rounders.indexOf( opts.round ) === -1 ) {
throw new Error( format( 'invalid option. `%s` option must be one of [%s].', 'round', rounders.join( ',' ) ) );
throw new Error( format( 'invalid option. `%s` option must be one of the following: "%s".', 'round', rounders.join( '", "' ) ) );
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions filled-by/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ function filledarrayBy() {
}
arg = arg[ ITERATOR_SYMBOL ]();
if ( !isFunction( arg.next ) ) {
throw new TypeError( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable.' );
throw new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );
}
return filledArrayIterator( arg, clbk, thisArg );
}
Expand All @@ -372,7 +372,7 @@ function filledarrayBy() {
}
arg = arg[ ITERATOR_SYMBOL ]();
if ( !isFunction( arg.next ) ) {
throw new TypeError( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable.' );
throw new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );
}
arr = new ctor( iterLength( arg ) );
} else {
Expand Down
4 changes: 2 additions & 2 deletions filled/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function filledarray() {
}
arg = arg[ ITERATOR_SYMBOL ]();
if ( !isFunction( arg.next ) ) {
throw new TypeError( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable.' );
throw new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );
}
return filledIterator( arg, value );
}
Expand Down Expand Up @@ -251,7 +251,7 @@ function filledarray() {
}
arg = arg[ ITERATOR_SYMBOL ]();
if ( !isFunction( arg.next ) ) {
throw new TypeError( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable.' );
throw new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );
}
arr = new ctor( iterLength( arg ) );
} else {
Expand Down

0 comments on commit fbc7dba

Please sign in to comment.