Skip to content

Commit 974d32e

Browse files
committed
refactor: use base array 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 0f6d4e7 commit 974d32e

File tree

1 file changed

+2
-1
lines changed
  • lib/node_modules/@stdlib/ndarray/base/binary/lib

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/ndarray/base/binary/lib/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var iterationOrder = require( '@stdlib/ndarray/base/iteration-order' );
2424
var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );
2525
var ndarray2object = require( '@stdlib/ndarray/base/ndarraylike2object' );
2626
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
27+
var anyIsEntryIn = require( '@stdlib/array/base/assert/any-is-entry-in' );
2728
var format = require( '@stdlib/string/format' );
2829
var blockedaccessorbinary2d = require( './2d_blocked_accessors.js' );
2930
var blockedaccessorbinary3d = require( './3d_blocked_accessors.js' );
@@ -134,7 +135,7 @@ var MAX_DIMS = BINARY.length - 1;
134135
* @returns {boolean} boolean indicating whether an ndarray data buffer implements the accessor protocol
135136
*/
136137
function hasAccessors( x, y, z ) {
137-
return ( x.accessorProtocol || y.accessorProtocol || z.accessorProtocol );
138+
return anyIsEntryIn( [ x, y, z ], 'accessorProtocol', true );
138139
}
139140

140141

0 commit comments

Comments
 (0)