File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
lib/node_modules/@stdlib/repl/lib/commands Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 2323// MODULES //
2424
2525var format = require ( '@stdlib/string/format' ) ;
26- var contains = require ( '@stdlib/assert/contains' ) ;
27- var isString = require ( '@stdlib/assert/is-string' ) ;
26+ var contains = require ( '@stdlib/array/base/ assert/contains' ) . factory ;
27+ var isString = require ( '@stdlib/assert/is-string' ) . isPrimitive ;
2828var ACTIONS = require ( './../actions.js' ) ;
2929
3030
31+ // VARIABLES //
32+
33+ var isAction = contains ( ACTIONS ) ;
34+
35+
3136// MAIN //
3237
3338/**
@@ -64,7 +69,7 @@ function command( repl ) {
6469 repl . _ostream . write ( format ( 'Error: invalid argument. First argument must be a string. Value: `%s`.\n' , action ) ) ;
6570 return ;
6671 }
67- if ( ! contains ( ACTIONS , action ) ) {
72+ if ( ! isAction ( action ) ) {
6873 repl . _ostream . write ( format ( 'Error: invalid argument. First argument must be a valid action name. Value: `%s`.\n' , action ) ) ;
6974 return ;
7075 }
You can’t perform that action at this time.
0 commit comments