Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* var out = expandContractions( str );
* // returns 'I will not be able to get you all out of this one.'
*
* str = 'It oughtn't to be my fault, because, you know, I didn't know';
* str = 'It oughtn\'t to be my fault, because, you know, I didn\'t know';
* out = expandContractions( str );
* // returns 'It ought not to be my fault, because, you know, I did not know'
*/
Expand Down
32 changes: 16 additions & 16 deletions lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,25 @@ function command( pres ) {
var str = repeat( pres._opts.newline, pres.height+1 );
pres._repl._ostream.write( str );
pres._repl.once( 'drain', onDrain );
}

/**
* Callback invoked upon a `drain` event.
/**
Comment thread
kgryte marked this conversation as resolved.
* Callback invoked upon a `drain` event.
*
* @private
*/
function onDrain() {
/*
* [ANSI escape sequences][1]:
*
* - `\u001b`: ESC, the escape character
* - `[1T`: scroll down one line
* - `[1G`: move the cursor to the beginning of the line
*
* @private
* [1]: https://en.wikipedia.org/wiki/ANSI_escape_code
*/
function onDrain() {
/*
* [ANSI escape sequences][1]:
*
* - `\u001b`: ESC, the escape character
* - `[1T`: scroll down one line
* - `[1G`: move the cursor to the beginning of the line
*
* [1]: https://en.wikipedia.org/wiki/ANSI_escape_code
*/
var str = '\u001b[1T\u001b[1G';
pres._repl._ostream.write( str );
}
var str = '\u001b[1T\u001b[1G';
pres._repl._ostream.write( str );
}
}

Expand Down
Loading