Skip to content

Commit e540283

Browse files
committed
refactor: use existing constant for hardcoded values
Signed-off-by: Snehil Shah <[email protected]> --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 7da041f commit e540283

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/node_modules/@stdlib/repl/lib/eager_evaluator.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ var replace = require( '@stdlib/string/replace' );
3131
var setNonEnumerableReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
3232
var processCommand = require( './process_command.js' );
3333
var compileCommand = require( './compile_command.js' );
34+
var ANSI_COLORS = require( './ansi_colors.js' );
3435

3536

3637
// VARIABLES //
@@ -44,6 +45,8 @@ var tempDB = {
4445
'isPure': true
4546
}
4647
};
48+
var ANSI_GRAY = ANSI_COLORS[ 'brightBlack' ];
49+
var ANSI_RESET = ANSI_COLORS[ 'reset' ];
4750

4851

4952
// MAIN //
@@ -145,7 +148,7 @@ setNonEnumerableReadOnly( EagerEvaluator.prototype, 'onKeypress', function onKey
145148
}
146149
cursorPosition = this._rli.cursor;
147150
pre = replace( this._repl._outputPrompt, '%d', ( this._repl._count+1 ).toString() );
148-
this._repl._ostream.write( '\n\u001b[90m' + pre + res + '\u001b[0m' );
151+
this._repl._ostream.write( '\n' + ANSI_GRAY + pre + res + ANSI_RESET );
149152
readline.moveCursor( this._repl._ostream, 0, -1 );
150153
readline.cursorTo( this._repl._ostream, cursorPosition + this._repl.promptLength() );
151154
this._isPreview = true;

0 commit comments

Comments
 (0)