Skip to content

Commit 4a8e5a7

Browse files
revert
1 parent e54e6a4 commit 4a8e5a7

2 files changed

Lines changed: 26 additions & 25 deletions

File tree

  • lib/node_modules/@stdlib

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
* @example
2727
* var expandContractions = require( '@stdlib/nlp/expand-contractions' );
2828
*
29-
* var str = "I'm ready.";
29+
* var str = "I won't be able to get y'all out of this one.";
3030
* var out = expandContractions( str );
31-
* // returns 'I am ready.'
31+
* // returns 'I will not be able to get you all out of this one.'
3232
*
33-
* str = "You're sure?";
33+
* str = 'It oughtn't to be my fault, because, you know, I didn't know';
3434
* out = expandContractions( str );
35-
* // returns 'You are sure?'
35+
* // returns 'It ought not to be my fault, because, you know, I did not know'
3636
*/
3737

3838
// MODULES //

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

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,33 @@ var repeat = require( '@stdlib/string/repeat' );
2828
// FUNCTIONS //
2929

3030
/**
31-
* Callback invoked upon a `drain` event.
31+
* Returns a callback to be invoked upon a `drain` event.
3232
*
3333
* @private
3434
* @param {Presentation} pres - presentation instance
35+
* @returns {Function} callback
3536
*/
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
37+
function createDrainHandler( pres ) {
38+
return onDrain;
39+
40+
/**
41+
* Callback invoked upon a `drain` event.
4342
*
44-
* [1]: https://en.wikipedia.org/wiki/ANSI_escape_code
43+
* @private
4544
*/
46-
var str = '\u001b[1T\u001b[1G';
47-
pres._repl._ostream.write( str );
45+
function onDrain() {
46+
/*
47+
* [ANSI escape sequences][1]:
48+
*
49+
* - `\u001b`: ESC, the escape character
50+
* - `[1T`: scroll down one line
51+
* - `[1G`: move the cursor to the beginning of the line
52+
*
53+
* [1]: https://en.wikipedia.org/wiki/ANSI_escape_code
54+
*/
55+
var str = '\u001b[1T\u001b[1G';
56+
pres._repl._ostream.write( str );
57+
}
4858
}
4959

5060

@@ -69,16 +79,7 @@ function command( pres ) {
6979
var str = repeat( pres._opts.newline, pres.height+1 );
7080
pres._repl._ostream.write( str );
7181

72-
pres._repl.once( 'drain', drain );
73-
74-
/**
75-
* Callback invoked upon a `drain` event.
76-
*
77-
* @private
78-
*/
79-
function drain() {
80-
onDrain( pres );
81-
}
82+
pres._repl.once( 'drain', createDrainHandler( pres ) );
8283
}
8384
}
8485

0 commit comments

Comments
 (0)