Skip to content

Commit bee48b7

Browse files
committed
refactor: use base array assertion utility
--- 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 e03f8cd commit bee48b7

File tree

1 file changed

+3
-2
lines changed
  • lib/node_modules/@stdlib/regexp/color-hexadecimal/lib

1 file changed

+3
-2
lines changed

lib/node_modules/@stdlib/regexp/color-hexadecimal/lib/main.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020

2121
// MODULES //
2222

23-
var contains = require( '@stdlib/assert/contains' );
23+
var contains = require( '@stdlib/array/base/assert/contains' ).factory;
2424
var format = require( '@stdlib/string/format' );
2525

2626

2727
// VARIABLES //
2828

2929
var MODES = [ 'full', 'shorthand', 'either' ];
30+
var isMode = contains( MODES );
3031

3132

3233
// MAIN //
@@ -50,7 +51,7 @@ var MODES = [ 'full', 'shorthand', 'either' ];
5051
*/
5152
function reColorHexadecimal( mode ) {
5253
if ( arguments.length > 0 ) {
53-
if ( !contains( MODES, mode ) ) {
54+
if ( !isMode( mode ) ) {
5455
throw new Error( format( 'invalid argument. Mode must be one of the following: "%s". Value: `%s`.', MODES.join( '", "' ), mode ) );
5556
}
5657
}

0 commit comments

Comments
 (0)