From 9c90cd208f2a20a08ae83fc68d29799f064793e7 Mon Sep 17 00:00:00 2001 From: SuYaSh-PaThAk04 Date: Thu, 29 Jan 2026 13:06:49 +0530 Subject: [PATCH 1/9] chore: fix JavaScript lint errors (issue #9965) --- .../nlp/expand-contractions/lib/index.js | 2 +- .../repl/presentation/lib/commands/blank.js | 40 +++++++++++++------ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js index fd5806490655..fc8e7cdc8396 100644 --- a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js +++ b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js @@ -26,7 +26,7 @@ * @example * var expandContractions = require( '@stdlib/nlp/expand-contractions' ); * -* var str = 'I won\'t be able to get y\'all out of this one.'; +* var str = "I won't be able to get y'all out of this one."; * var out = expandContractions( str ); * // returns 'I will not be able to get you all out of this one.' * diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js index 04764d1b3132..7f469bb24e77 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js @@ -25,6 +25,29 @@ var repeat = require( '@stdlib/string/repeat' ); +// FUNCTIONS // + +/** +* Callback invoked upon a `drain` event. +* +* @private +* @param {Presentation} pres - presentation instance +*/ +function onDrain( pres ) { + /* + * [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 ); +} + + // MAIN // /** @@ -45,25 +68,16 @@ function command( pres ) { function onCommand() { var str = repeat( pres._opts.newline, pres.height+1 ); pres._repl._ostream.write( str ); - pres._repl.once( 'drain', onDrain ); + + pres._repl.once( 'drain', drain ); /** * 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 - * - * [1]: https://en.wikipedia.org/wiki/ANSI_escape_code - */ - var str = '\u001b[1T\u001b[1G'; - pres._repl._ostream.write( str ); + function drain() { + onDrain( pres ); } } } From e54e6a45b12b183c83d90a4d0e47bd80cee7d5c8 Mon Sep 17 00:00:00 2001 From: SuYaSh-PaThAk04 Date: Thu, 29 Jan 2026 13:20:36 +0530 Subject: [PATCH 2/9] fixed the example --- .../@stdlib/nlp/expand-contractions/lib/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js index fc8e7cdc8396..c486aa8a8f92 100644 --- a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js +++ b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js @@ -26,13 +26,13 @@ * @example * var expandContractions = require( '@stdlib/nlp/expand-contractions' ); * -* var str = "I won't be able to get y'all out of this one."; +* var str = "I'm ready."; * var out = expandContractions( str ); -* // returns 'I will not be able to get you all out of this one.' +* // returns 'I am ready.' * -* str = 'It oughtn't to be my fault, because, you know, I didn't know'; +* str = "You're sure?"; * out = expandContractions( str ); -* // returns 'It ought not to be my fault, because, you know, I did not know' +* // returns 'You are sure?' */ // MODULES // From 4a8e5a7cd35391d7161826dc8a9d33efebe646c7 Mon Sep 17 00:00:00 2001 From: SuYaSh-PaThAk04 Date: Thu, 29 Jan 2026 13:29:56 +0530 Subject: [PATCH 3/9] revert --- .../nlp/expand-contractions/lib/index.js | 8 ++-- .../repl/presentation/lib/commands/blank.js | 43 ++++++++++--------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js index c486aa8a8f92..fc8e7cdc8396 100644 --- a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js +++ b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js @@ -26,13 +26,13 @@ * @example * var expandContractions = require( '@stdlib/nlp/expand-contractions' ); * -* var str = "I'm ready."; +* var str = "I won't be able to get y'all out of this one."; * var out = expandContractions( str ); -* // returns 'I am ready.' +* // returns 'I will not be able to get you all out of this one.' * -* str = "You're sure?"; +* str = 'It oughtn't to be my fault, because, you know, I didn't know'; * out = expandContractions( str ); -* // returns 'You are sure?' +* // returns 'It ought not to be my fault, because, you know, I did not know' */ // MODULES // diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js index 7f469bb24e77..580f4fc0278c 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js @@ -28,23 +28,33 @@ var repeat = require( '@stdlib/string/repeat' ); // FUNCTIONS // /** -* Callback invoked upon a `drain` event. +* Returns a callback to be invoked upon a `drain` event. * * @private * @param {Presentation} pres - presentation instance +* @returns {Function} callback */ -function onDrain( pres ) { - /* - * [ANSI escape sequences][1]: - * - * - `\u001b`: ESC, the escape character - * - `[1T`: scroll down one line - * - `[1G`: move the cursor to the beginning of the line +function createDrainHandler( pres ) { + return onDrain; + + /** + * Callback invoked upon a `drain` event. * - * [1]: https://en.wikipedia.org/wiki/ANSI_escape_code + * @private */ - var str = '\u001b[1T\u001b[1G'; - pres._repl._ostream.write( str ); + 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 ); + } } @@ -69,16 +79,7 @@ function command( pres ) { var str = repeat( pres._opts.newline, pres.height+1 ); pres._repl._ostream.write( str ); - pres._repl.once( 'drain', drain ); - - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function drain() { - onDrain( pres ); - } + pres._repl.once( 'drain', createDrainHandler( pres ) ); } } From 602937b2ab95b4ea57ef54021ccff6007fa6bdd6 Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 29 Jan 2026 00:27:51 -0800 Subject: [PATCH 4/9] docs: update example Signed-off-by: Athan --- lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js index fc8e7cdc8396..be54db94cb74 100644 --- a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js +++ b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js @@ -26,7 +26,7 @@ * @example * var expandContractions = require( '@stdlib/nlp/expand-contractions' ); * -* var str = "I won't be able to get y'all out of this one."; +* var str = 'I won\\'t be able to get y\\'all out of this one.'; * var out = expandContractions( str ); * // returns 'I will not be able to get you all out of this one.' * From fcd30dfc1433cb669805d9481a5d118170b6f930 Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 29 Jan 2026 00:28:50 -0800 Subject: [PATCH 5/9] refactor: move function to correct scope Signed-off-by: Athan --- .../repl/presentation/lib/commands/blank.js | 44 ++++++------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js index 580f4fc0278c..0b4e658f441a 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js @@ -25,18 +25,28 @@ var repeat = require( '@stdlib/string/repeat' ); -// FUNCTIONS // +// MAIN // /** -* Returns a callback to be invoked upon a `drain` event. +* Returns a callback to be invoked upon calling the `blank` command. * * @private * @param {Presentation} pres - presentation instance * @returns {Function} callback */ -function createDrainHandler( pres ) { - return onDrain; +function command( pres ) { + return onCommand; + /** + * Prints a "blank" slide. + * + * @private + */ + function onCommand() { + 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. * @@ -58,32 +68,6 @@ function createDrainHandler( pres ) { } -// MAIN // - -/** -* Returns a callback to be invoked upon calling the `blank` command. -* -* @private -* @param {Presentation} pres - presentation instance -* @returns {Function} callback -*/ -function command( pres ) { - return onCommand; - - /** - * Prints a "blank" slide. - * - * @private - */ - function onCommand() { - var str = repeat( pres._opts.newline, pres.height+1 ); - pres._repl._ostream.write( str ); - - pres._repl.once( 'drain', createDrainHandler( pres ) ); - } -} - - // EXPORTS // module.exports = command; From 4cc42121cb3278388da08b578f8ab5bb4d60a88f Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 29 Jan 2026 00:29:56 -0800 Subject: [PATCH 6/9] style: add empty line Signed-off-by: Athan --- lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js index 0b4e658f441a..64930cfb611c 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/blank.js @@ -47,6 +47,7 @@ function command( pres ) { pres._repl._ostream.write( str ); pres._repl.once( 'drain', onDrain ); } + /** * Callback invoked upon a `drain` event. * From d77ae2a2e64ebcf54b007b894a3d8e1ced654647 Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 29 Jan 2026 00:31:15 -0800 Subject: [PATCH 7/9] docs: update example Signed-off-by: Athan --- lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js index be54db94cb74..b2ccbfde54a3 100644 --- a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js +++ b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js @@ -26,7 +26,7 @@ * @example * var expandContractions = require( '@stdlib/nlp/expand-contractions' ); * -* var str = 'I won\\'t be able to get y\\'all out of this one.'; +* var str = 'I won\\\'t be able to get y\\\'all out of this one.'; * var out = expandContractions( str ); * // returns 'I will not be able to get you all out of this one.' * From eb78a26d502c33c15cd7e8aa11dbe93edabc6f19 Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 29 Jan 2026 00:52:44 -0800 Subject: [PATCH 8/9] docs: update example Signed-off-by: Athan --- lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js index b2ccbfde54a3..fc8e7cdc8396 100644 --- a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js +++ b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js @@ -26,7 +26,7 @@ * @example * var expandContractions = require( '@stdlib/nlp/expand-contractions' ); * -* var str = 'I won\\\'t be able to get y\\\'all out of this one.'; +* var str = "I won't be able to get y'all out of this one."; * var out = expandContractions( str ); * // returns 'I will not be able to get you all out of this one.' * From f63c72f17e88b1b45e1119c3ef14ed30ffd75a51 Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 29 Jan 2026 01:08:27 -0800 Subject: [PATCH 9/9] docs: fix example Signed-off-by: Athan --- lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js index fc8e7cdc8396..b55fc2f088b6 100644 --- a/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js +++ b/lib/node_modules/@stdlib/nlp/expand-contractions/lib/index.js @@ -26,11 +26,11 @@ * @example * var expandContractions = require( '@stdlib/nlp/expand-contractions' ); * -* var str = "I won't be able to get y'all out of this one."; +* var str = 'I won\'t be able to get y\'all out of this one.'; * 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' */