Skip to content

Commit 6277feb

Browse files
authored
chore: fix JavaScript lint errors
PR-URL: #10701 Closes: #10693 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent 0c31eaf commit 6277feb

File tree

2 files changed

+37
-34
lines changed

2 files changed

+37
-34
lines changed

lib/node_modules/@stdlib/boolean/ctor/test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ tape( 'the function returns `true` when provided any object which is not null',
114114
values = [
115115
new Bool( false ),
116116
new Bool( true ),
117-
new Number( 0 ), // eslint-disable-line no-new-wrappers
117+
new Number( 0 ),
118118
[],
119119
{},
120120
function noop() {}
@@ -157,7 +157,7 @@ tape( 'when used as a constructor, the function returns a Boolean object (truthy
157157
values = [
158158
new Bool( false ),
159159
new Bool( true ),
160-
new Number( 0 ), // eslint-disable-line no-new-wrappers
160+
new Number( 0 ),
161161
'5',
162162
5,
163163
-5,

lib/node_modules/@stdlib/nlp/lda/lib/matrix.js

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,41 @@ var Float64Array = require( '@stdlib/array/float64' );
2525
var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
2626

2727

28+
// FUNCTIONS //
29+
30+
/**
31+
* Returns a matrix element based on the provided row and column indices.
32+
*
33+
* @private
34+
* @param {integer} i - row index
35+
* @param {integer} j - column index
36+
* @returns {(number|undefined)} matrix element
37+
*/
38+
function get( i, j ) {
39+
/* eslint-disable no-invalid-this */
40+
var idx = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
41+
return this.data[ idx ];
42+
}
43+
44+
/**
45+
* Sets a matrix element based on the provided row and column indices.
46+
*
47+
* @private
48+
* @param {integer} i - row index
49+
* @param {integer} j - column index
50+
* @param {number} v - value to set
51+
* @returns {Matrix} Matrix instance
52+
*/
53+
function set( i, j, v ) {
54+
/* eslint-disable no-invalid-this */
55+
i = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
56+
if ( i >= 0 ) {
57+
this.data[ i ] = v;
58+
}
59+
return this;
60+
}
61+
62+
2863
// MAIN //
2964

3065
/**
@@ -79,38 +114,6 @@ function matrix() {
79114
setReadOnly( mat, 'get', get );
80115
setReadOnly( mat, 'set', set );
81116
return mat;
82-
83-
/**
84-
* Returns a matrix element based on the provided row and column indices.
85-
*
86-
* @private
87-
* @param {integer} i - row index
88-
* @param {integer} j - column index
89-
* @returns {(number|undefined)} matrix element
90-
*/
91-
function get( i, j ) {
92-
/* eslint-disable no-invalid-this */
93-
var idx = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
94-
return this.data[ idx ];
95-
}
96-
97-
/**
98-
* Sets a matrix element based on the provided row and column indices.
99-
*
100-
* @private
101-
* @param {integer} i - row index
102-
* @param {integer} j - column index
103-
* @param {number} v - value to set
104-
* @returns {Matrix} Matrix instance
105-
*/
106-
function set( i, j, v ) {
107-
/* eslint-disable no-invalid-this */
108-
i = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] );
109-
if ( i >= 0 ) {
110-
this.data[ i ] = v;
111-
}
112-
return this;
113-
}
114117
}
115118

116119

0 commit comments

Comments
 (0)