diff --git a/lib/node_modules/@stdlib/_tools/github/get/lib/factory.js b/lib/node_modules/@stdlib/_tools/github/get/lib/factory.js index 9832176dd6e1..c00801f9ec51 100644 --- a/lib/node_modules/@stdlib/_tools/github/get/lib/factory.js +++ b/lib/node_modules/@stdlib/_tools/github/get/lib/factory.js @@ -114,22 +114,22 @@ function factory( options, clbk ) { */ function get() { resolve( opts, done ); + } - /** - * Callback invoked after resolving resources. - * - * @private - * @param {(Error|null)} error - error object - * @param {(ObjectArray|null)} data - query data - * @param {(Object|null)} info - response info - * @returns {void} - */ - function done( error, data, info ) { - error = error || null; - data = data || null; - info = info || null; - clbk( error, data, info ); - } + /** + * Callback invoked after resolving resources. + * + * @private + * @param {(Error|null)} error - error object + * @param {(ObjectArray|null)} data - query data + * @param {(Object|null)} info - response info + * @returns {void} + */ + function done( error, data, info ) { + error = error || null; + data = data || null; + info = info || null; + clbk( error, data, info ); } } diff --git a/lib/node_modules/@stdlib/repl/lib/commands/load.js b/lib/node_modules/@stdlib/repl/lib/commands/load.js index 3a3353ad83e2..b4569d155828 100644 --- a/lib/node_modules/@stdlib/repl/lib/commands/load.js +++ b/lib/node_modules/@stdlib/repl/lib/commands/load.js @@ -70,44 +70,44 @@ function command( repl ) { debug( 'Loading a file...' ); repl.load( fpath, clbk ); } + } - /** - * Callback invoked upon loading a file. - * - * @private - * @param {Error} [error] - error object - */ - function clbk( error ) { - var pos; - if ( error ) { - // NOTE: we can assume that the error pertains to actually reading the file (e.g., loading from disk) and NOT the line-by-line evaluation, where error handling should be handled separately... - debug( 'Error: %s', error.message ); - - // Infer the current cursor column position based on the length of the command prompt string: - pos = repl._prompt().length; // FIXME: how to address multi-column characters? - - // FIXME: handle non-TTY output streams! - - /* - * Print the error message on the previous line and generate the expected display prompt and cursor position. - * - * [ANSI escape sequences][1]: - * - * - `\u001b`: ESC, the escape character - * - `[1A`: move cursor up one line - * - `[nD`: move cursor back (to the left) `n` columns (cells) - * - `[0J`: clear the screen beginning from the current cursor position to the end of the screen - * - * [1]: https://en.wikipedia.org/wiki/ANSI_escape_code - */ - repl._ostream.write( '\u001b[1A\u001b['+pos+'DError: '+error.message+'\u001b[0J\n' ); - - // Show a new display prompt: - repl._displayPrompt(); - return; - } - debug( 'Successfully loaded file.' ); + /** + * Callback invoked upon loading a file. + * + * @private + * @param {Error} [error] - error object + */ + function clbk( error ) { + var pos; + if ( error ) { + // NOTE: we can assume that the error pertains to actually reading the file (e.g., loading from disk) and NOT the line-by-line evaluation, where error handling should be handled separately... + debug( 'Error: %s', error.message ); + + // Infer the current cursor column position based on the length of the command prompt string: + pos = repl._prompt().length; // FIXME: how to address multi-column characters? + + // FIXME: handle non-TTY output streams! + + /* + * Print the error message on the previous line and generate the expected display prompt and cursor position. + * + * [ANSI escape sequences][1]: + * + * - `\u001b`: ESC, the escape character + * - `[1A`: move cursor up one line + * - `[nD`: move cursor back (to the left) `n` columns (cells) + * - `[0J`: clear the screen beginning from the current cursor position to the end of the screen + * + * [1]: https://en.wikipedia.org/wiki/ANSI_escape_code + */ + repl._ostream.write( '\u001b[1A\u001b['+pos+'DError: '+error.message+'\u001b[0J\n' ); + + // Show a new display prompt: + repl._displayPrompt(); + return; } + debug( 'Successfully loaded file.' ); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/first_fragment.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/first_fragment.js index ceaba2c4c17e..fc39060e1d6b 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/first_fragment.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/first_fragment.js @@ -37,15 +37,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.firstFragment().show(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.firstFragment().show(); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/next_slide.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/next_slide.js index 77a75bbb6772..4cca8ac30e61 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/next_slide.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/next_slide.js @@ -37,15 +37,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.nextSlide().show(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.nextSlide().show(); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev.js index 3fb86e9a1578..8f4499a97c21 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev.js @@ -37,15 +37,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.prev().show(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.prev().show(); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev_slide.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev_slide.js index f6406ae5b692..49cc49893db0 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev_slide.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/prev_slide.js @@ -37,15 +37,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.prevSlide().show(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.prevSlide().show(); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/redraw.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/redraw.js index 9b79d6945422..2915ee938cdb 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/redraw.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/redraw.js @@ -37,15 +37,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.show(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.show(); } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/reload_presentation.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/reload_presentation.js index 79421e466aa3..ea5866207973 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/reload_presentation.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/reload_presentation.js @@ -49,41 +49,41 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - var pos; - try { - pres.reload().show(); - } catch ( error ) { - debug( 'Error: %s', error.message ); - - // Infer the current cursor column position based on the length of the command prompt string: - pos = pres._repl._prompt().length; // FIXME: how to address multi-column characters? - - // FIXME: handle non-TTY output streams! - - /* - * Print the error message on the previous line and generate the expected display prompt and cursor position. - * - * [ANSI escape sequences][1]: - * - * - `\u001b`: ESC, the escape character - * - `[1A`: move cursor up one line - * - `[nD`: move cursor back (to the left) `n` columns (cells) - * - `[0J`: clear the screen beginning from the current cursor position to the end of the screen - * - * [1]: https://en.wikipedia.org/wiki/ANSI_escape_code - */ - pres._repl._ostream.write( '\u001b[1A\u001b['+pos+'DError: '+error.message+'\u001b[0J\n' ); - - // Show a new display prompt: - pres._repl._displayPrompt(); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + var pos; + try { + pres.reload().show(); + } catch ( error ) { + debug( 'Error: %s', error.message ); + + // Infer the current cursor column position based on the length of the command prompt string: + pos = pres._repl._prompt().length; // FIXME: how to address multi-column characters? + + // FIXME: handle non-TTY output streams! + + /* + * Print the error message on the previous line and generate the expected display prompt and cursor position. + * + * [ANSI escape sequences][1]: + * + * - `\u001b`: ESC, the escape character + * - `[1A`: move cursor up one line + * - `[nD`: move cursor back (to the left) `n` columns (cells) + * - `[0J`: clear the screen beginning from the current cursor position to the end of the screen + * + * [1]: https://en.wikipedia.org/wiki/ANSI_escape_code + */ + pres._repl._ostream.write( '\u001b[1A\u001b['+pos+'DError: '+error.message+'\u001b[0J\n' ); + + // Show a new display prompt: + pres._repl._displayPrompt(); } } } diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/run_slide.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/run_slide.js index abe0ab3f77c0..a304a8214487 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/run_slide.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/run_slide.js @@ -42,15 +42,15 @@ function command( pres ) { */ function onCommand() { pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle + } - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.run( noop ); - } + /** + * Callback invoked upon a `drain` event. + * + * @private + */ + function onDrain() { + pres.run( noop ); } }