Skip to content

Commit dfccbcd

Browse files
committed
refactor: use dedicated utility for joining array elements
--- 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 3323474 commit dfccbcd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • lib/node_modules/@stdlib/array/nans/lib

lib/node_modules/@stdlib/array/nans/lib/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ var Complex64 = require( '@stdlib/complex/float32/ctor' );
2626
var full = require( '@stdlib/array/full' );
2727
var defaults = require( '@stdlib/array/defaults' );
2828
var dtypes = require( '@stdlib/array/dtypes' );
29+
var join = require( '@stdlib/array/base/join' );
2930
var format = require( '@stdlib/string/format' );
3031

3132

@@ -64,7 +65,7 @@ function nans( length ) {
6465
if ( arguments.length > 1 ) {
6566
dtype = arguments[ 1 ];
6667
if ( !isValidDType( dtype ) ) {
67-
throw new TypeError( format( 'invalid argument. Second argument must be one of the following: "%s". Value: `%s`.', DTYPES.join( '", "' ), dtype ) );
68+
throw new TypeError( format( 'invalid argument. Second argument must be one of the following: "%s". Value: `%s`.', join( DTYPES, '", "' ), dtype ) );
6869
}
6970
} else {
7071
dtype = DEFAULT_DTYPE;

0 commit comments

Comments
 (0)