Skip to content

Commit 931cce0

Browse files
committed
Update variable names
1 parent f39d0d1 commit 931cce0

File tree

15 files changed

+35
-35
lines changed

15 files changed

+35
-35
lines changed

lib/node_modules/@stdlib/string/examples/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
'use strict';
2020

21-
var getKeys = require( '@stdlib/utils/keys' );
21+
var objectKeys = require( '@stdlib/utils/keys' );
2222
var string = require( './../lib' );
2323

24-
console.log( getKeys( string ) );
24+
console.log( objectKeys( string ) );

lib/node_modules/@stdlib/string/from-code-point/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ out = fromCodePoint( new Uint16Array( [ 97, 98, 99 ] ) );
9696
```javascript
9797
var randu = require( '@stdlib/random/base/randu' );
9898
var floor = require( '@stdlib/math/base/special/floor' );
99-
var MAX_BMP_CODE_POINT = require( '@stdlib/constants/string/unicode-max-bmp' );
99+
var UNICODE_MAX_BMP = require( '@stdlib/constants/string/unicode-max-bmp' );
100100
var fromCodePoint = require( '@stdlib/string/from-code-point' );
101101

102102
var x;
103103
var i;
104104

105105
for ( i = 0; i < 100; i++ ) {
106-
x = floor( randu()*MAX_BMP_CODE_POINT );
106+
x = floor( randu()*UNICODE_MAX_BMP );
107107
console.log( '%d => %s', x, fromCodePoint( x ) );
108108
}
109109
```

lib/node_modules/@stdlib/string/from-code-point/benchmark/benchmark.apply.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var randu = require( '@stdlib/random/base/randu' );
2525
var floor = require( '@stdlib/math/base/special/floor' );
2626
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
2727
var pow = require( '@stdlib/math/base/special/pow' );
28-
var MAX_CODE_POINT = require( '@stdlib/constants/string/unicode-max' );
28+
var UNICODE_MAX = require( '@stdlib/constants/string/unicode-max' );
2929
var pkg = require( './../package.json' ).name;
3030
var fromCodePoint = require( './../lib' );
3131

@@ -53,7 +53,7 @@ function createBenchmark( fcn, len ) {
5353

5454
x = new Array( len );
5555
for ( i = 0; i < x.length; i++ ) {
56-
x[ i ] = floor( randu()*MAX_CODE_POINT );
56+
x[ i ] = floor( randu()*UNICODE_MAX );
5757
}
5858
return benchmark;
5959

@@ -69,7 +69,7 @@ function createBenchmark( fcn, len ) {
6969

7070
b.tic();
7171
for ( i = 0; i < b.iterations; i++ ) {
72-
x[ 0 ] = floor( randu()*MAX_CODE_POINT );
72+
x[ 0 ] = floor( randu()*UNICODE_MAX );
7373
out = fcn.apply( null, x );
7474
if ( typeof out !== 'string' ) {
7575
b.fail( 'should return a string' );

lib/node_modules/@stdlib/string/from-code-point/benchmark/benchmark.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var bench = require( '@stdlib/bench' );
2424
var randu = require( '@stdlib/random/base/randu' );
2525
var floor = require( '@stdlib/math/base/special/floor' );
2626
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
27-
var MAX_CODE_POINT = require( '@stdlib/constants/string/unicode-max' );
27+
var UNICODE_MAX = require( '@stdlib/constants/string/unicode-max' );
2828
var pkg = require( './../package.json' ).name;
2929
var fromCodePoint = require( './../lib' );
3030

@@ -45,7 +45,7 @@ bench( pkg, function benchmark( b ) {
4545

4646
b.tic();
4747
for ( i = 0; i < b.iterations; i++ ) {
48-
x = floor( randu() * MAX_CODE_POINT );
48+
x = floor( randu() * UNICODE_MAX );
4949
out = fromCodePoint( x );
5050
if ( typeof out !== 'string' ) {
5151
b.fail( 'should return a string' );
@@ -66,7 +66,7 @@ bench( pkg+'::built-in', opts, function benchmark( b ) {
6666

6767
b.tic();
6868
for ( i = 0; i < b.iterations; i++ ) {
69-
x = floor( randu() * MAX_CODE_POINT );
69+
x = floor( randu() * UNICODE_MAX );
7070
out = String.fromCodePoint( x );
7171
if ( typeof out !== 'string' ) {
7272
b.fail( 'should return a string' );

lib/node_modules/@stdlib/string/from-code-point/benchmark/benchmark.length.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var randu = require( '@stdlib/random/base/randu' );
2525
var floor = require( '@stdlib/math/base/special/floor' );
2626
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
2727
var pow = require( '@stdlib/math/base/special/pow' );
28-
var MAX_CODE_POINT = require( '@stdlib/constants/string/unicode-max' );
28+
var UNICODE_MAX = require( '@stdlib/constants/string/unicode-max' );
2929
var Float64Array = require( '@stdlib/array/float64' );
3030
var pkg = require( './../package.json' ).name;
3131
var fromCodePoint = require( './../lib' );
@@ -46,7 +46,7 @@ function createBenchmark( len ) {
4646

4747
x = new Float64Array( len );
4848
for ( i = 0; i < x.length; i++ ) {
49-
x[ i ] = floor( randu()*MAX_CODE_POINT );
49+
x[ i ] = floor( randu()*UNICODE_MAX );
5050
}
5151
return benchmark;
5252

@@ -62,7 +62,7 @@ function createBenchmark( len ) {
6262

6363
b.tic();
6464
for ( i = 0; i < b.iterations; i++ ) {
65-
x[ 0 ] = floor( randu()*MAX_CODE_POINT );
65+
x[ 0 ] = floor( randu()*UNICODE_MAX );
6666
out = fromCodePoint( x );
6767
if ( typeof out !== 'string' ) {
6868
b.fail( 'should return a string' );

lib/node_modules/@stdlib/string/from-code-point/examples/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
var randu = require( '@stdlib/random/base/randu' );
2222
var floor = require( '@stdlib/math/base/special/floor' );
23-
var MAX_BMP_CODE_POINT = require( '@stdlib/constants/string/unicode-max-bmp' );
23+
var UNICODE_MAX_BMP = require( '@stdlib/constants/string/unicode-max-bmp' );
2424
var fromCodePoint = require( './../lib' );
2525

2626
var x;
2727
var i;
2828

2929
for ( i = 0; i < 100; i++ ) {
30-
x = floor( randu()*MAX_BMP_CODE_POINT );
30+
x = floor( randu()*UNICODE_MAX_BMP );
3131
console.log( '%d => %s', x, fromCodePoint( x ) );
3232
}

lib/node_modules/@stdlib/string/from-code-point/lib/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
var isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;
2424
var isCollection = require( '@stdlib/assert/is-collection' );
25-
var MAX_CODE_POINT = require( '@stdlib/constants/string/unicode-max' );
26-
var MAX_BMP_CODE_POINT = require( '@stdlib/constants/string/unicode-max-bmp' );
25+
var UNICODE_MAX = require( '@stdlib/constants/string/unicode-max' );
26+
var UNICODE_MAX_BMP = require( '@stdlib/constants/string/unicode-max-bmp' );
2727

2828

2929
// VARIABLES //
@@ -92,10 +92,10 @@ function fromCodePoint( args ) {
9292
if ( !isNonNegativeInteger( pt ) ) {
9393
throw new TypeError( 'invalid argument. Must provide valid code points (nonnegative integers). Value: `'+pt+'`.' );
9494
}
95-
if ( pt > MAX_CODE_POINT ) {
95+
if ( pt > UNICODE_MAX ) {
9696
throw new RangeError( 'invalid argument. Must provide a valid code point (cannot exceed max). Value: `'+pt+'`.' );
9797
}
98-
if ( pt <= MAX_BMP_CODE_POINT ) {
98+
if ( pt <= UNICODE_MAX_BMP ) {
9999
str += fromCharCode( pt );
100100
} else {
101101
// Code point from a supplementary plane. Split into two 16-bit code units (surrogate pair).

lib/node_modules/@stdlib/string/left-pad/lib/left_pad.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).is
2424
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
2525
var repeat = require( '@stdlib/string/repeat' );
2626
var ceil = require( '@stdlib/math/base/special/ceil' );
27-
var MAX_SAFE_INTEGER = require( '@stdlib/constants/math/float64-max-safe-integer' );
27+
var FLOAT64_MAX_SAFE_INTEGER = require( '@stdlib/constants/math/float64-max-safe-integer' );
2828

2929

3030
// MAIN //
@@ -73,7 +73,7 @@ function lpad( str, len, pad ) {
7373
} else {
7474
p = ' ';
7575
}
76-
if ( len > MAX_SAFE_INTEGER ) {
76+
if ( len > FLOAT64_MAX_SAFE_INTEGER ) {
7777
throw new RangeError( 'invalid argument. Output string length exceeds maximum allowed string length.' );
7878
}
7979
n = ( len - str.length ) / p.length;

lib/node_modules/@stdlib/string/pad/lib/pad.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var ceil = require( '@stdlib/math/base/special/ceil' );
2828
var lpad = require( '@stdlib/string/left-pad' );
2929
var rpad = require( '@stdlib/string/right-pad' );
3030
var abs = require( '@stdlib/math/base/special/abs' );
31-
var MAX_SAFE_INTEGER = require( '@stdlib/constants/math/float64-max-safe-integer' );
31+
var FLOAT64_MAX_SAFE_INTEGER = require( '@stdlib/constants/math/float64-max-safe-integer' );
3232
var validate = require( './validate.js' );
3333

3434

@@ -99,7 +99,7 @@ function pad( str, len, options ) {
9999
if ( !isNonNegativeInteger( len ) ) {
100100
throw new TypeError( 'invalid argument. Second argument must be a nonnegative integer. Value: `' + len + '`.' );
101101
}
102-
if ( len > MAX_SAFE_INTEGER ) {
102+
if ( len > FLOAT64_MAX_SAFE_INTEGER ) {
103103
throw new RangeError( 'invalid argument. Output string length exceeds maximum allowed string length. Value: `'+len+'`.' );
104104
}
105105
opts = {};

lib/node_modules/@stdlib/string/pad/lib/validate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
// MODULES //
2222

23-
var isObject = require( '@stdlib/assert/is-plain-object' );
23+
var isPlainObject = require( '@stdlib/assert/is-plain-object' );
2424
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
2525
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
2626
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
@@ -51,7 +51,7 @@ var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
5151
* }
5252
*/
5353
function validate( opts, options ) {
54-
if ( !isObject( options ) ) {
54+
if ( !isPlainObject( options ) ) {
5555
return new TypeError( 'invalid argument. Options argument must be an object. Value: `' + options + '`.' );
5656
}
5757
if ( hasOwnProp( options, 'lpad' ) ) {

0 commit comments

Comments
 (0)