Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function query( slug, title, options, clbk ) {
* @returns {void}
*/
function done( error, response, data ) {
var resetDate;
var info;
if ( arguments.length === 1 ) {
debug( 'No available rate limit information.' );
Expand All @@ -84,7 +85,12 @@ function query( slug, title, options, clbk ) {
info = ratelimit( response.headers );
debug( 'Rate limit: %d', info.limit );
debug( 'Rate limit remaining: %d', info.remaining );
debug( 'Rate limit reset: %s', (new Date( info.reset*1000 )).toISOString() );
resetDate = new Date( info.reset * 1000 );
if ( isNaN( resetDate.getTime() ) ) {
debug( 'Rate limit reset: [Invalid Date]' );
} else {
debug( 'Rate limit reset: %s', resetDate.toISOString() );
}

if ( error ) {
return clbk( error, null, info );
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/boolean/ctor/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ tape( 'the function returns `true` when provided any object which is not null',
values = [
new Bool( false ),
new Bool( true ),
new Number( 0 ), // eslint-disable-line no-new-wrappers
new Number( 0 ),
[],
{},
function noop() {}
Expand Down Expand Up @@ -157,7 +157,7 @@ tape( 'when used as a constructor, the function returns a Boolean object (truthy
values = [
new Bool( false ),
new Bool( true ),
new Number( 0 ), // eslint-disable-line no-new-wrappers
new Number( 0 ),
'5',
5,
-5,
Expand Down
58 changes: 29 additions & 29 deletions lib/node_modules/@stdlib/nlp/lda/lib/matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,38 +79,38 @@ function matrix() {
setReadOnly( mat, 'get', get );
setReadOnly( mat, 'set', set );
return mat;
}

/**
* Returns a matrix element based on the provided row and column indices.
*
* @private
* @param {integer} i - row index
* @param {integer} j - column index
* @returns {(number|undefined)} matrix element
*/
function get( i, j ) {
/* eslint-disable no-invalid-this */
var idx = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
return this.data[ idx ];
}
/**
* Returns a matrix element based on the provided row and column indices.
*
* @private
* @param {integer} i - row index
* @param {integer} j - column index
* @returns {(number|undefined)} matrix element
*/
function get( i, j ) {
/* eslint-disable no-invalid-this */
var idx = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
return this.data[ idx ];
}

/**
* Sets a matrix element based on the provided row and column indices.
*
* @private
* @param {integer} i - row index
* @param {integer} j - column index
* @param {number} v - value to set
* @returns {Matrix} Matrix instance
*/
function set( i, j, v ) {
/* eslint-disable no-invalid-this */
i = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
if ( i >= 0 ) {
this.data[ i ] = v;
}
return this;
/**
* Sets a matrix element based on the provided row and column indices.
*
* @private
* @param {integer} i - row index
* @param {integer} j - column index
* @param {number} v - value to set
* @returns {Matrix} Matrix instance
*/
function set( i, j, v ) {
/* eslint-disable no-invalid-this */
i = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
if ( i >= 0 ) {
this.data[ i ] = v;
}
return this;
}


Expand Down