@stdlib/ndarray-base-assert-is-read-only 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +1 -1
- package/README.md +6 -3
- package/SECURITY.md +5 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +3 -3
- package/docs/types/index.d.ts +1 -1
- package/lib/main.js +6 -2
- package/package.json +5 -19
- package/CITATION.cff +0 -30
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2024 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -164,7 +164,7 @@ See [LICENSE][stdlib-license].
|
|
|
164
164
|
|
|
165
165
|
## Copyright
|
|
166
166
|
|
|
167
|
-
Copyright © 2016-
|
|
167
|
+
Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
168
168
|
|
|
169
169
|
</section>
|
|
170
170
|
|
|
@@ -177,8 +177,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
177
177
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/ndarray-base-assert-is-read-only.svg
|
|
178
178
|
[npm-url]: https://npmjs.org/package/@stdlib/ndarray-base-assert-is-read-only
|
|
179
179
|
|
|
180
|
-
[test-image]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/actions/workflows/test.yml/badge.svg?branch=v0.
|
|
181
|
-
[test-url]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/actions/workflows/test.yml?query=branch:v0.
|
|
180
|
+
[test-image]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/actions/workflows/test.yml/badge.svg?branch=v0.2.1
|
|
181
|
+
[test-url]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/actions/workflows/test.yml?query=branch:v0.2.1
|
|
182
182
|
|
|
183
183
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/ndarray-base-assert-is-read-only/main.svg
|
|
184
184
|
[coverage-url]: https://codecov.io/github/stdlib-js/ndarray-base-assert-is-read-only?branch=main
|
|
@@ -201,8 +201,11 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
201
201
|
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
202
202
|
|
|
203
203
|
[deno-url]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/deno
|
|
204
|
+
[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/blob/deno/README.md
|
|
204
205
|
[umd-url]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/umd
|
|
206
|
+
[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/blob/umd/README.md
|
|
205
207
|
[esm-url]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm
|
|
208
|
+
[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/blob/esm/README.md
|
|
206
209
|
[branches-url]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/blob/main/branches.md
|
|
207
210
|
|
|
208
211
|
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/ndarray-base-assert-is-read-only/main/LICENSE
|
package/SECURITY.md
ADDED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
function
|
|
3
|
-
});var
|
|
1
|
+
"use strict";var s=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var i=s(function(o,t){
|
|
2
|
+
var u=require('@stdlib/ndarray-base-flag/dist');function a(e){return u(e,"READONLY")===!0}t.exports=a
|
|
3
|
+
});var n=i();module.exports=n;
|
|
4
4
|
/** @license Apache-2.0 */
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../lib/main.js", "../lib/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests whether an ndarray is read-only.\n*\n* @param {ndarray} arr - input ndarray\n* @returns {boolean} boolean indicating whether an ndarray is read-only\n*\n* @example\n* var array = require( '@stdlib/ndarray-array' );\n*\n* var x = array( [ 1, 2, 3, 4 ], {\n* 'readonly': true\n* });\n* var bool = isReadOnly( x );\n* // returns true\n*\n* x = array( [ 1, 2, 3, 4 ] );\n* bool = isReadOnly( x );\n* // returns false\n*/\nfunction isReadOnly( arr ) {\n\
|
|
5
|
-
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,
|
|
6
|
-
"names": ["require_main", "__commonJSMin", "exports", "module", "
|
|
4
|
+
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar flag = require( '@stdlib/ndarray-base-flag' );\n\n\n// MAIN //\n\n/**\n* Tests whether an ndarray is read-only.\n*\n* @param {ndarray} arr - input ndarray\n* @returns {boolean} boolean indicating whether an ndarray is read-only\n*\n* @example\n* var array = require( '@stdlib/ndarray-array' );\n*\n* var x = array( [ 1, 2, 3, 4 ], {\n* 'readonly': true\n* });\n* var bool = isReadOnly( x );\n* // returns true\n*\n* x = array( [ 1, 2, 3, 4 ] );\n* bool = isReadOnly( x );\n* // returns false\n*/\nfunction isReadOnly( arr ) {\n\treturn ( flag( arr, 'READONLY' ) === true );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isReadOnly;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an ndarray is read-only.\n*\n* @module @stdlib/ndarray-base-assert-is-read-only\n*\n* @example\n* var array = require( '@stdlib/ndarray-array' );\n* var isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' );\n*\n* var x = array( [ 1, 2, 3, 4 ], {\n* 'readonly': true\n* });\n* var bool = isReadOnly( x );\n* // returns true\n*\n* x = array( [ 1, 2, 3, 4 ] );\n* bool = isReadOnly( x );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
|
|
5
|
+
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAO,QAAS,2BAA4B,EAwBhD,SAASC,EAAYC,EAAM,CAC1B,OAASF,EAAME,EAAK,UAAW,IAAM,EACtC,CAKAH,EAAO,QAAUE,ICXjB,IAAIE,EAAO,IAKX,OAAO,QAAUA",
|
|
6
|
+
"names": ["require_main", "__commonJSMin", "exports", "module", "flag", "isReadOnly", "arr", "main"]
|
|
7
7
|
}
|
package/docs/types/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ import { ndarray } from '@stdlib/types/ndarray';
|
|
|
29
29
|
* @returns boolean indicating whether an ndarray is read-only
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
-
* var array = require(
|
|
32
|
+
* var array = require( '@stdlib/ndarray-array' );
|
|
33
33
|
*
|
|
34
34
|
* var x = array( [ [ 1, 2 ], [ 3, 4 ] ], {
|
|
35
35
|
* 'readonly': true
|
package/lib/main.js
CHANGED
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
|
|
19
19
|
'use strict';
|
|
20
20
|
|
|
21
|
+
// MODULES //
|
|
22
|
+
|
|
23
|
+
var flag = require( '@stdlib/ndarray-base-flag' );
|
|
24
|
+
|
|
25
|
+
|
|
21
26
|
// MAIN //
|
|
22
27
|
|
|
23
28
|
/**
|
|
@@ -40,8 +45,7 @@
|
|
|
40
45
|
* // returns false
|
|
41
46
|
*/
|
|
42
47
|
function isReadOnly( arr ) {
|
|
43
|
-
|
|
44
|
-
return ( flags && flags.READONLY === true );
|
|
48
|
+
return ( flag( arr, 'READONLY' ) === true );
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/ndarray-base-assert-is-read-only",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Test if an ndarray is read-only.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -15,19 +15,12 @@
|
|
|
15
15
|
],
|
|
16
16
|
"main": "./lib",
|
|
17
17
|
"directories": {
|
|
18
|
-
"benchmark": "./benchmark",
|
|
19
18
|
"doc": "./docs",
|
|
20
|
-
"example": "./examples",
|
|
21
19
|
"lib": "./lib",
|
|
22
|
-
"
|
|
20
|
+
"dist": "./dist"
|
|
23
21
|
},
|
|
24
22
|
"types": "./docs/types",
|
|
25
|
-
"scripts": {
|
|
26
|
-
"test": "make test",
|
|
27
|
-
"test-cov": "make test-cov",
|
|
28
|
-
"examples": "make examples",
|
|
29
|
-
"benchmark": "make benchmark"
|
|
30
|
-
},
|
|
23
|
+
"scripts": {},
|
|
31
24
|
"homepage": "https://stdlib.io",
|
|
32
25
|
"repository": {
|
|
33
26
|
"type": "git",
|
|
@@ -37,16 +30,9 @@
|
|
|
37
30
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
38
31
|
},
|
|
39
32
|
"dependencies": {
|
|
40
|
-
"@stdlib/
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@stdlib/assert-is-boolean": "^0.1.0",
|
|
44
|
-
"@stdlib/bench": "^0.1.0",
|
|
45
|
-
"@stdlib/ndarray-array": "^0.1.0",
|
|
46
|
-
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
|
|
47
|
-
"istanbul": "^0.4.1",
|
|
48
|
-
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
|
|
33
|
+
"@stdlib/ndarray-base-flag": "^0.2.1"
|
|
49
34
|
},
|
|
35
|
+
"devDependencies": {},
|
|
50
36
|
"engines": {
|
|
51
37
|
"node": ">=0.10.0",
|
|
52
38
|
"npm": ">2.7.0"
|
package/CITATION.cff
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
cff-version: 1.2.0
|
|
2
|
-
title: stdlib
|
|
3
|
-
message: >-
|
|
4
|
-
If you use this software, please cite it using the
|
|
5
|
-
metadata from this file.
|
|
6
|
-
|
|
7
|
-
type: software
|
|
8
|
-
|
|
9
|
-
authors:
|
|
10
|
-
- name: The Stdlib Authors
|
|
11
|
-
url: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
12
|
-
|
|
13
|
-
repository-code: https://github.com/stdlib-js/stdlib
|
|
14
|
-
url: https://stdlib.io
|
|
15
|
-
|
|
16
|
-
abstract: |
|
|
17
|
-
Standard library for JavaScript and Node.js.
|
|
18
|
-
|
|
19
|
-
keywords:
|
|
20
|
-
- JavaScript
|
|
21
|
-
- Node.js
|
|
22
|
-
- TypeScript
|
|
23
|
-
- standard library
|
|
24
|
-
- scientific computing
|
|
25
|
-
- numerical computing
|
|
26
|
-
- statistical computing
|
|
27
|
-
|
|
28
|
-
license: Apache-2.0 AND BSL-1.0
|
|
29
|
-
|
|
30
|
-
date-released: 2016
|