Skip to content

Commit 7f23f98

Browse files
committed
style: adding spaces in parenthesis
--- 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 7fce9d3 commit 7f23f98

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function EagerEvaluator( repl, rli, enabled ) {
8787
* @returns {void}
8888
*
8989
*/
90-
setNonEnumerableReadOnly(EagerEvaluator.prototype, 'onKeypress', function onKeypress() {
90+
setNonEnumerableReadOnly( EagerEvaluator.prototype, 'onKeypress', function onKeypress() {
9191
var cursorPosition;
9292
var executable;
9393
var nlInd;
@@ -97,29 +97,29 @@ setNonEnumerableReadOnly(EagerEvaluator.prototype, 'onKeypress', function onKeyp
9797
var res;
9898
var tmp;
9999

100-
if (!this._enabled || this._rli.line === '' || this._repl._completerEngine.isNavigating()) {
100+
if ( !this._enabled || this._rli.line === '' || this._repl._completerEngine.isNavigating() ) {
101101
return;
102102
}
103103

104-
code = this._cmd.join('\n') + this._rli.line;
104+
code = this._cmd.join( '\n' ) + this._rli.line;
105105
opts = {
106106
'timeout': this._repl._timeout,
107107
'displayErrors': false,
108108
'breakOnSigint': true // Node.js >=6.3.0
109109
};
110-
if (!this.isSideEffectFree(code)) {
111-
debug('code have side effect');
110+
if ( !this.isSideEffectFree( code ) ) {
111+
debug( 'code have side effect' );
112112
return;
113113
}
114-
debug('try to process command');
115-
tmp = processCommand(code);
116-
if (tmp instanceof Error) {
114+
debug( 'try to process command' );
115+
tmp = processCommand( code );
116+
if ( tmp instanceof Error ) {
117117
debug( 'getting error %s', tmp.message );
118118
return;
119119
}
120-
debug('try to compile command');
121-
executable = compileCommand(tmp);
122-
if (executable instanceof Error) {
120+
debug( 'try to compile command' );
121+
executable = compileCommand( tmp );
122+
if ( executable instanceof Error ) {
123123
debug( 'getting error %s', executable.message );
124124
return;
125125
}
@@ -134,16 +134,16 @@ setNonEnumerableReadOnly(EagerEvaluator.prototype, 'onKeypress', function onKeyp
134134
return;
135135
}
136136

137-
res = inspect(res);
138-
nlInd = res.indexOf('\n');
137+
res = inspect( res );
138+
nlInd = res.indexOf( '\n' );
139139
if ( nlInd !== -1 ) {
140-
res = res.slice(0, nlInd ) + '...';
140+
res = res.slice( 0, nlInd ) + '...';
141141
}
142142
cursorPosition = this._rli.cursor;
143-
pre = replace( this._repl._outputPrompt, '%d', (this._repl._count+1).toString() );
143+
pre = replace( this._repl._outputPrompt, '%d', ( this._repl._count+1 ).toString() );
144144
this._repl._ostream.write( '\n\u001b[90m' + pre + res + '\u001b[0m' );
145-
readline.moveCursor(this._repl._ostream, 0, -1);
146-
readline.cursorTo(this._repl._ostream, cursorPosition + this._repl.promptLength() );
145+
readline.moveCursor( this._repl._ostream, 0, -1 );
146+
readline.cursorTo( this._repl._ostream, cursorPosition + this._repl.promptLength() );
147147
this._isPreview = true;
148148
debug( 'sucess' );
149149
});
@@ -159,7 +159,7 @@ setNonEnumerableReadOnly(EagerEvaluator.prototype, 'onKeypress', function onKeyp
159159
* @returns {void}
160160
*
161161
*/
162-
setNonEnumerableReadOnly(EagerEvaluator.prototype, 'beforeKeypress', function beforeKeypress() {
162+
setNonEnumerableReadOnly( EagerEvaluator.prototype, 'beforeKeypress', function beforeKeypress() {
163163
if (!this._isPreview ) {
164164
return;
165165
}
@@ -204,7 +204,7 @@ setNonEnumerableReadOnly( EagerEvaluator.prototype, 'isSideEffectFree', function
204204
* @param {Object} node - ast node
205205
* @returns {Boolean} - boolean indicating whether the node is side effect free or not
206206
*/
207-
function traverse(node) {
207+
function traverse( node ) {
208208
var fname;
209209
var i;
210210
if ( !node ) {

0 commit comments

Comments
 (0)