Skip to content

Commit 0396f52

Browse files
committed
test: add assign tests
--- 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: passed - 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 baf4098 commit 0396f52

File tree

2 files changed

+1633
-2
lines changed

2 files changed

+1633
-2
lines changed

lib/node_modules/@stdlib/blas/ext/index-of/lib/assign.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,15 @@ function assign( x, searchElement, fromIndex, out, options ) {
131131
else if (
132132
nargs === 4 &&
133133
isndarrayLike( fromIndex ) &&
134-
!isndarrayLike( out )
134+
!isndarrayLike( out ) &&
135+
isObject( out )
135136
) {
136137
opts = objectAssign( opts, out );
137138
out = fromIndex;
138139
fromIndex = 0;
139-
} else if ( nargs === 5 ) {
140+
}
141+
// Case: assign( x, searchElement, fromIndex, out, options )
142+
else if ( nargs === 5 ) {
140143
if ( !isObject( options ) ) {
141144
throw new TypeError( format( 'invalid argument. The fifth argument must be an object. Value: `%s`.', options ) );
142145
}

0 commit comments

Comments
 (0)