Skip to content

Commit a405ab5

Browse files
committed
refactor: use base utility to resolve an ndarray flag
1 parent 51f9fd3 commit a405ab5

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • lib/node_modules/@stdlib/ndarray/base/assert/is-read-only/lib

lib/node_modules/@stdlib/ndarray/base/assert/is-read-only/lib/main.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818

1919
'use strict';
2020

21+
// MODULES //
22+
23+
var flag = require( '@stdlib/ndarray/base/flag' );
24+
25+
2126
// MAIN //
2227

2328
/**
@@ -40,8 +45,7 @@
4045
* // returns false
4146
*/
4247
function isReadOnly( arr ) {
43-
var flags = arr.flags;
44-
return ( flags && flags.READONLY === true );
48+
return ( flag( arr, 'READONLY' ) === true );
4549
}
4650

4751

0 commit comments

Comments
 (0)