Skip to content

Commit 9c90cd2

Browse files
chore: fix JavaScript lint errors (issue #9965)
1 parent 112d5e4 commit 9c90cd2

File tree

2 files changed

+28
-14
lines changed
  • lib/node_modules/@stdlib

2 files changed

+28
-14
lines changed

lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* @example
2727
* var expandContractions = require( '@stdlib/nlp/expand-contractions' );
2828
*
29-
* var str = 'I won\'t be able to get y\'all out of this one.';
29+
* var str = "I won't be able to get y'all out of this one.";
3030
* var out = expandContractions( str );
3131
* // returns 'I will not be able to get you all out of this one.'
3232
*

lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,29 @@
2525
var repeat = require( '@stdlib/string/repeat' );
2626

2727

28+
// FUNCTIONS //
29+
30+
/**
31+
* Callback invoked upon a `drain` event.
32+
*
33+
* @private
34+
* @param {Presentation} pres - presentation instance
35+
*/
36+
function onDrain( pres ) {
37+
/*
38+
* [ANSI escape sequences][1]:
39+
*
40+
* - `\u001b`: ESC, the escape character
41+
* - `[1T`: scroll down one line
42+
* - `[1G`: move the cursor to the beginning of the line
43+
*
44+
* [1]: https://en.wikipedia.org/wiki/ANSI_escape_code
45+
*/
46+
var str = '\u001b[1T\u001b[1G';
47+
pres._repl._ostream.write( str );
48+
}
49+
50+
2851
// MAIN //
2952

3053
/**
@@ -45,25 +68,16 @@ function command( pres ) {
4568
function onCommand() {
4669
var str = repeat( pres._opts.newline, pres.height+1 );
4770
pres._repl._ostream.write( str );
48-
pres._repl.once( 'drain', onDrain );
71+
72+
pres._repl.once( 'drain', drain );
4973

5074
/**
5175
* Callback invoked upon a `drain` event.
5276
*
5377
* @private
5478
*/
55-
function onDrain() {
56-
/*
57-
* [ANSI escape sequences][1]:
58-
*
59-
* - `\u001b`: ESC, the escape character
60-
* - `[1T`: scroll down one line
61-
* - `[1G`: move the cursor to the beginning of the line
62-
*
63-
* [1]: https://en.wikipedia.org/wiki/ANSI_escape_code
64-
*/
65-
var str = '\u001b[1T\u001b[1G';
66-
pres._repl._ostream.write( str );
79+
function drain() {
80+
onDrain( pres );
6781
}
6882
}
6983
}

0 commit comments

Comments
 (0)