Skip to content

Commit 3e76627

Browse files
committed
Directly assign named export to variable
1 parent 57e5152 commit 3e76627

File tree

10 files changed

+30
-30
lines changed

10 files changed

+30
-30
lines changed

lib/node_modules/@stdlib/_tools/licenses/scripts/update_headers

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
var CLI = require( '@stdlib/cli/ctor' );
3030
var stdin = require( '@stdlib/process/read-stdin' );
3131
var stdinStream = require( '@stdlib/streams/node/stdin' );
32-
var reEOL = require( '@stdlib/regexp/eol' );
32+
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
3333
var isRegExpString = require( '@stdlib/assert/is-regexp-string' );
3434
var reFromString = require( '@stdlib/utils/regexp-from-string' );
3535
var licenseHeader = require( '@stdlib/_tools/licenses/header' );
@@ -126,7 +126,7 @@ function main() {
126126
}
127127
split = reFromString( flags.split );
128128
} else {
129-
split = reEOL.REGEXP;
129+
split = RE_EOL;
130130
}
131131
return stdin( onRead );
132132
}

lib/node_modules/@stdlib/_tools/lint/license-header-glob/test/test.cli.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var tape = require( 'tape' );
2626
var IS_BROWSER = require( '@stdlib/assert/is-browser' );
2727
var IS_WINDOWS = require( '@stdlib/assert/is-windows' );
2828
var isJSON = require( '@stdlib/assert/is-json' );
29-
var reEOL = require( '@stdlib/regexp/eol' );
29+
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
3030
var replace = require( '@stdlib/string/replace' );
3131
var readFileSync = require( '@stdlib/fs/read-file' ).sync;
3232
var EXEC_PATH = require( '@stdlib/process/exec-path' );
@@ -190,7 +190,7 @@ tape( 'the command-line interface prints newline-delimited JSON (NDJSON) if file
190190
t.pass( error.message );
191191
t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
192192

193-
results = stderr.toString().split( reEOL.REGEXP );
193+
results = stderr.toString().split( RE_EOL );
194194
t.strictEqual( results.length-1 > 3, true, 'returns expected number of errors' );
195195
for ( i = 0; i < results.length-1; i++ ) {
196196
t.strictEqual( isJSON( results[i] ), true, 'returns JSON' );
@@ -309,7 +309,7 @@ tape( 'the command-line interface supports specifying a file containing license
309309
t.pass( error.message );
310310
t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
311311

312-
results = stderr.toString().split( reEOL.REGEXP );
312+
results = stderr.toString().split( RE_EOL );
313313
t.strictEqual( results.length-1 > 3, true, 'returns expected number of errors' );
314314
for ( i = 0; i < results.length-1; i++ ) {
315315
t.strictEqual( isJSON( results[i] ), true, 'returns JSON' );
@@ -347,7 +347,7 @@ tape( 'the command-line interface supports specifying a file containing license
347347
t.pass( error.message );
348348
t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
349349

350-
results = stderr.toString().split( reEOL.REGEXP );
350+
results = stderr.toString().split( RE_EOL );
351351
t.strictEqual( results.length-1 > 3, true, 'returns expected number of errors' );
352352
for ( i = 0; i < results.length-1; i++ ) {
353353
t.strictEqual( isJSON( results[i] ), true, 'returns JSON' );
@@ -414,7 +414,7 @@ tape( 'the command-line interface supports specifying a file containing a licens
414414
t.pass( error.message );
415415
t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
416416

417-
results = stderr.toString().split( reEOL.REGEXP );
417+
results = stderr.toString().split( RE_EOL );
418418
t.strictEqual( results.length-1 > 3, true, 'returns expected number of errors' );
419419
for ( i = 0; i < results.length-1; i++ ) {
420420
t.strictEqual( isJSON( results[i] ), true, 'returns JSON' );
@@ -452,7 +452,7 @@ tape( 'the command-line interface supports specifying a file containing a licens
452452
t.pass( error.message );
453453
t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
454454

455-
results = stderr.toString().split( reEOL.REGEXP );
455+
results = stderr.toString().split( RE_EOL );
456456
t.strictEqual( results.length-1 > 3, true, 'returns expected number of errors' );
457457
for ( i = 0; i < results.length-1; i++ ) {
458458
t.strictEqual( isJSON( results[i] ), true, 'returns JSON' );
@@ -519,7 +519,7 @@ tape( 'the command-line interface supports specifying multiple license header op
519519
t.pass( error.message );
520520
t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
521521

522-
results = stderr.toString().split( reEOL.REGEXP );
522+
results = stderr.toString().split( RE_EOL );
523523
t.strictEqual( results.length-1 > 3, true, 'returns expected number of errors' );
524524
for ( i = 0; i < results.length-1; i++ ) {
525525
t.strictEqual( isJSON( results[i] ), true, 'returns JSON' );
@@ -557,7 +557,7 @@ tape( 'the command-line interface supports specifying multiple license header op
557557
t.pass( error.message );
558558
t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
559559

560-
results = stderr.toString().split( reEOL.REGEXP );
560+
results = stderr.toString().split( RE_EOL );
561561
t.strictEqual( results.length-1 > 3, true, 'returns expected number of errors' );
562562
for ( i = 0; i < results.length-1; i++ ) {
563563
t.strictEqual( isJSON( results[i] ), true, 'returns JSON' );

lib/node_modules/@stdlib/_tools/lint/license-header/test/test.cli.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var exec = require( 'child_process' ).exec;
2525
var tape = require( 'tape' );
2626
var IS_BROWSER = require( '@stdlib/assert/is-browser' );
2727
var IS_WINDOWS = require( '@stdlib/assert/is-windows' );
28-
var reEOL = require( '@stdlib/regexp/eol' );
28+
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
2929
var replace = require( '@stdlib/string/replace' );
3030
var readFileSync = require( '@stdlib/fs/read-file' ).sync;
3131
var EXEC_PATH = require( '@stdlib/process/exec-path' );
@@ -216,7 +216,7 @@ tape( 'the command-line interface prints an error message if a file does not con
216216
t.pass( error.message );
217217
t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
218218

219-
results = stderr.toString().split( reEOL.REGEXP );
219+
results = stderr.toString().split( RE_EOL );
220220
t.strictEqual( results.length-1, 1, 'returns expected number of errors' );
221221
t.strictEqual( results[0], 'Error: malformed or missing license header.', 'prints expected message' );
222222
} else {
@@ -247,7 +247,7 @@ tape( 'the command-line interface prints an error message if a file does not con
247247
t.pass( error.message );
248248
t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
249249

250-
results = stderr.toString().split( reEOL.REGEXP );
250+
results = stderr.toString().split( RE_EOL );
251251
t.strictEqual( results.length-1, 1, 'returns expected number of errors' );
252252
t.strictEqual( results[0], 'Error: malformed or missing license header.', 'prints expected message' );
253253
} else {
@@ -283,7 +283,7 @@ tape( 'the command-line interface prints an error message if unable to read a `h
283283
}
284284
t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
285285

286-
results = stderr.toString().split( reEOL.REGEXP );
286+
results = stderr.toString().split( RE_EOL );
287287
t.strictEqual( results.length-1, 1, 'returns expected number of errors' );
288288
t.strictEqual( results[0].length > 0, true, 'prints an error message' );
289289

@@ -348,7 +348,7 @@ tape( 'when used as a standard stream, if a file contains lint errors, the comma
348348
}
349349
t.strictEqual( stdout.toString(), '', 'does not print to `stdout`' );
350350

351-
results = stderr.toString().split( reEOL.REGEXP );
351+
results = stderr.toString().split( RE_EOL );
352352
t.strictEqual( results.length-1, 1, 'returns expected number of errors' );
353353
t.strictEqual( results[0], 'Error: malformed or missing license header.', 'prints expected message' );
354354

lib/node_modules/@stdlib/_tools/scripts/create_namespace_types.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* limitations under the License.
1919
*/
2020

21-
/* eslint-disable no-sync, no-console */
21+
/* eslint-disable node/no-sync, no-console */
2222

2323
'use strict';
2424

@@ -29,7 +29,7 @@ var fs = require( 'fs' );
2929
var contains = require( '@stdlib/assert/contains' );
3030
var stdin = require( '@stdlib/process/read-stdin' );
3131
var stdinStream = require( '@stdlib/streams/node/stdin' );
32-
var reEOL = require( '@stdlib/regexp/eol' );
32+
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
3333
var removePunctuation = require( '@stdlib/string/remove-punctuation' );
3434
var readJSON = require( '@stdlib/fs/read-json' ).sync;
3535
var replace = require( '@stdlib/string/replace' );
@@ -293,7 +293,7 @@ function onRead( error, data ) {
293293
if ( error ) {
294294
return console.error( error.message );
295295
}
296-
lines = data.toString().split( reEOL.REGEXP );
296+
lines = data.toString().split( RE_EOL );
297297
for ( i = 0; i < lines.length; i++ ) {
298298
if ( lines[ i ] && !contains( lines[ i ], '_tools' ) ) {
299299
create( lines[ i ] );

lib/node_modules/@stdlib/bench/harness/lib/runner/encode_assertion.js

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

2525
var replace = require( '@stdlib/string/replace' );
2626
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
27-
var reEOL = require( '@stdlib/regexp/eol' );
27+
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
2828

2929

3030
// VARIABLES //
@@ -105,7 +105,7 @@ function encodeAssertion( result, count ) {
105105
stack = errorStack;
106106
}
107107
if ( stack ) {
108-
lines = stack.toString().split( reEOL.REGEXP );
108+
lines = stack.toString().split( RE_EOL );
109109
out += indent + 'stack: |-\n';
110110
for ( i = 0; i < lines.length; i++ ) {
111111
out += indent + ' ' + lines[ i ] + '\n';

lib/node_modules/@stdlib/datasets/afinn-111/test/test.cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var tape = require( 'tape' );
2626
var IS_BROWSER = require( '@stdlib/assert/is-browser' );
2727
var IS_WINDOWS = require( '@stdlib/assert/is-windows' );
2828
var EXEC_PATH = require( '@stdlib/process/exec-path' );
29-
var reEOL = require( '@stdlib/regexp/eol' );
29+
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
3030
var readFileSync = require( '@stdlib/fs/read-file' ).sync;
3131

3232

@@ -188,7 +188,7 @@ tape( 'the command-line interface prints the word list (newline-delimited JSON)'
188188
if ( error ) {
189189
t.fail( error.message );
190190
} else {
191-
stdout = stdout.toString().split( reEOL.REGEXP );
191+
stdout = stdout.toString().split( RE_EOL );
192192
for ( i = 0; i < expected.length; i++ ) {
193193
str = JSON.stringify( expected[ i ] );
194194
t.strictEqual( stdout[ i ], str, 'returns expected JSON string' );

lib/node_modules/@stdlib/datasets/anscombes-quartet/test/test.cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var tape = require( 'tape' );
2626
var IS_BROWSER = require( '@stdlib/assert/is-browser' );
2727
var IS_WINDOWS = require( '@stdlib/assert/is-windows' );
2828
var EXEC_PATH = require( '@stdlib/process/exec-path' );
29-
var reEOL = require( '@stdlib/regexp/eol' );
29+
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
3030
var readFileSync = require( '@stdlib/fs/read-file' ).sync;
3131

3232

@@ -155,7 +155,7 @@ tape( 'the command-line interface prints data to `stdout`', opts, function test(
155155
t.fail( error.message );
156156
} else {
157157
// Should print 12 lines (header + 11 lines of data) and include a trailing newline...
158-
t.strictEqual( stdout.toString().split( reEOL.REGEXP ).length, 13, 'prints expected number of lines to `stdout`' );
158+
t.strictEqual( stdout.toString().split( RE_EOL ).length, 13, 'prints expected number of lines to `stdout`' );
159159
t.strictEqual( stderr.toString(), '', 'does not print to `stderr`' );
160160
}
161161
t.end();

lib/node_modules/@stdlib/datasets/berndt-cps-wages-1985/test/test.cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var tape = require( 'tape' );
2626
var IS_BROWSER = require( '@stdlib/assert/is-browser' );
2727
var IS_WINDOWS = require( '@stdlib/assert/is-windows' );
2828
var EXEC_PATH = require( '@stdlib/process/exec-path' );
29-
var reEOL = require( '@stdlib/regexp/eol' );
29+
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
3030
var readFileSync = require( '@stdlib/fs/read-file' ).sync;
3131

3232

@@ -188,7 +188,7 @@ tape( 'the command-line interface prints Current Population Survey (CPS) data (n
188188
if ( error ) {
189189
t.fail( error.message );
190190
} else {
191-
stdout = stdout.toString().split( reEOL.REGEXP );
191+
stdout = stdout.toString().split( RE_EOL );
192192
for ( i = 0; i < expected.length; i++ ) {
193193
str = JSON.stringify( expected[ i ] );
194194
t.strictEqual( stdout[ i ], str, 'returns expected JSON string' );

lib/node_modules/@stdlib/repl/scripts/build_contributors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var logger = require( 'debug' );
2727
var resolveParentPath = require( '@stdlib/fs/resolve-parent-path' ).sync;
2828
var readFile = require( '@stdlib/fs/read-file' ).sync;
2929
var writeFile = require( '@stdlib/fs/write-file' ).sync;
30-
var reEOL = require( '@stdlib/regexp/eol' );
30+
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
3131
var trim = require( '@stdlib/string/trim' );
3232

3333

@@ -89,7 +89,7 @@ function main() {
8989
debug( 'Successfully read file.' );
9090

9191
debug( 'Extracting contributors.' );
92-
file = file.split( reEOL.REGEXP );
92+
file = file.split( RE_EOL );
9393
json = [];
9494
for ( i = 0; i < file.length; i++ ) {
9595
line = file[ i ];

lib/node_modules/@stdlib/repl/scripts/build_tutorials.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var hasOwnProp = require( '@stdlib/assert/has-own-property' );
3636
var lowercase = require( '@stdlib/string/lowercase' );
3737
var trim = require( '@stdlib/string/trim' );
3838
var ltrim = require( '@stdlib/string/left-trim' );
39-
var reEOL = require( '@stdlib/regexp/eol' );
39+
var RE_EOL = require( '@stdlib/regexp/eol' ).REGEXP;
4040

4141

4242
// VARIABLES //
@@ -220,7 +220,7 @@ function main() {
220220
}
221221
if ( RE_FRONT_MATTER.test( file ) ) {
222222
debug( 'Parsing front matter meta data.' );
223-
file = file.split( reEOL.REGEXP );
223+
file = file.split( RE_EOL );
224224
fm = [];
225225
for ( j = 0; j < file.length; j++ ) {
226226
l = file[ j ];

0 commit comments

Comments
 (0)