@stdlib/ndarray-base-assert-is-unsigned-integer-data-type 0.2.2 → 0.3.0
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 -6
- package/dist/index.js +3 -3
- package/dist/index.js.map +3 -3
- package/lib/main.js +9 -4
- package/package.json +3 -4
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2026 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ var isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigne
|
|
|
65
65
|
|
|
66
66
|
#### isUnsignedIntegerDataType( value )
|
|
67
67
|
|
|
68
|
-
Tests if an input
|
|
68
|
+
Tests if an input value is a supported ndarray unsigned integer data type.
|
|
69
69
|
|
|
70
70
|
```javascript
|
|
71
71
|
var bool = isUnsignedIntegerDataType( 'float32' );
|
|
@@ -184,7 +184,7 @@ See [LICENSE][stdlib-license].
|
|
|
184
184
|
|
|
185
185
|
## Copyright
|
|
186
186
|
|
|
187
|
-
Copyright © 2016-
|
|
187
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
188
188
|
|
|
189
189
|
</section>
|
|
190
190
|
|
|
@@ -197,8 +197,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
197
197
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/ndarray-base-assert-is-unsigned-integer-data-type.svg
|
|
198
198
|
[npm-url]: https://npmjs.org/package/@stdlib/ndarray-base-assert-is-unsigned-integer-data-type
|
|
199
199
|
|
|
200
|
-
[test-image]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/actions/workflows/test.yml/badge.svg?branch=v0.
|
|
201
|
-
[test-url]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/actions/workflows/test.yml?query=branch:v0.
|
|
200
|
+
[test-image]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/actions/workflows/test.yml/badge.svg?branch=v0.3.0
|
|
201
|
+
[test-url]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/actions/workflows/test.yml?query=branch:v0.3.0
|
|
202
202
|
|
|
203
203
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/main.svg
|
|
204
204
|
[coverage-url]: https://codecov.io/github/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type?branch=main
|
|
@@ -210,8 +210,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
210
210
|
|
|
211
211
|
-->
|
|
212
212
|
|
|
213
|
-
[chat-image]: https://img.shields.io/
|
|
214
|
-
[chat-url]: https://
|
|
213
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
214
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
215
215
|
|
|
216
216
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
217
217
|
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
var
|
|
3
|
-
});var
|
|
1
|
+
"use strict";var n=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var i=n(function(p,t){
|
|
2
|
+
var s=require('@stdlib/array-base-assert-contains/dist').factory,a=require('@stdlib/ndarray-base-dtype-strings/dist'),u=s(a("unsigned_integer"));function c(r){return u(String(r))}t.exports=c
|
|
3
|
+
});var g=i();module.exports=g;
|
|
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) 2023 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 contains = require( '@stdlib/array-base-assert-contains' ).factory;\nvar dtypes = require( '@stdlib/ndarray-dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray unsigned integer data type.\n*\n* @
|
|
5
|
-
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAW,QAAS,oCAAqC,EAAE,QAC3DC,EAAS,QAAS,
|
|
6
|
-
"names": ["require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isUnsignedIntegerDataType", "main"]
|
|
4
|
+
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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 contains = require( '@stdlib/array-base-assert-contains' ).factory;\nvar dtypes = require( '@stdlib/ndarray-base-dtype-strings' );\n\n\n// VARIABLES //\n\nvar isDataType = contains( dtypes( 'unsigned_integer' ) );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray unsigned integer data type.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray unsigned integer data type\n*\n* @example\n* var bool = isUnsignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int16' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int8' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'uint16' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint32' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8c' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'foo' );\n* // returns false\n*/\nfunction isUnsignedIntegerDataType( v ) {\n\treturn isDataType( String( v ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isUnsignedIntegerDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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 input value is a supported ndarray unsigned integer data type.\n*\n* @module @stdlib/ndarray-base-assert-is-unsigned-integer-data-type\n*\n* @example\n* var isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' );\n*\n* var bool = isUnsignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int16' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int8' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'uint16' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint32' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8c' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'foo' );\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,EAAW,QAAS,oCAAqC,EAAE,QAC3DC,EAAS,QAAS,oCAAqC,EAKvDC,EAAaF,EAAUC,EAAQ,kBAAmB,CAAE,EAgDxD,SAASE,EAA2BC,EAAI,CACvC,OAAOF,EAAY,OAAQE,CAAE,CAAE,CAChC,CAKAL,EAAO,QAAUI,IChBjB,IAAIE,EAAO,IAKX,OAAO,QAAUA",
|
|
6
|
+
"names": ["require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isDataType", "isUnsignedIntegerDataType", "v", "main"]
|
|
7
7
|
}
|
package/lib/main.js
CHANGED
|
@@ -21,7 +21,12 @@
|
|
|
21
21
|
// MODULES //
|
|
22
22
|
|
|
23
23
|
var contains = require( '@stdlib/array-base-assert-contains' ).factory;
|
|
24
|
-
var dtypes = require( '@stdlib/ndarray-
|
|
24
|
+
var dtypes = require( '@stdlib/ndarray-base-dtype-strings' );
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// VARIABLES //
|
|
28
|
+
|
|
29
|
+
var isDataType = contains( dtypes( 'unsigned_integer' ) );
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
// MAIN //
|
|
@@ -29,8 +34,6 @@ var dtypes = require( '@stdlib/ndarray-dtypes' );
|
|
|
29
34
|
/**
|
|
30
35
|
* Tests whether an input value is a supported ndarray unsigned integer data type.
|
|
31
36
|
*
|
|
32
|
-
* @name isUnsignedIntegerDataType
|
|
33
|
-
* @type {Function}
|
|
34
37
|
* @param {*} v - value to test
|
|
35
38
|
* @returns {boolean} boolean indicating whether an input value is a supported ndarray unsigned integer data type
|
|
36
39
|
*
|
|
@@ -71,7 +74,9 @@ var dtypes = require( '@stdlib/ndarray-dtypes' );
|
|
|
71
74
|
* bool = isUnsignedIntegerDataType( 'foo' );
|
|
72
75
|
* // returns false
|
|
73
76
|
*/
|
|
74
|
-
|
|
77
|
+
function isUnsignedIntegerDataType( v ) {
|
|
78
|
+
return isDataType( String( v ) );
|
|
79
|
+
}
|
|
75
80
|
|
|
76
81
|
|
|
77
82
|
// EXPORTS //
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Test if an input value is a supported ndarray unsigned integer data type.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@stdlib/array-base-assert-contains": "^0.2.
|
|
34
|
-
"@stdlib/ndarray-
|
|
33
|
+
"@stdlib/array-base-assert-contains": "^0.2.2",
|
|
34
|
+
"@stdlib/ndarray-base-dtype-strings": "^0.1.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {},
|
|
37
37
|
"engines": {
|
|
@@ -72,7 +72,6 @@
|
|
|
72
72
|
"validation",
|
|
73
73
|
"isvalid"
|
|
74
74
|
],
|
|
75
|
-
"__stdlib__": {},
|
|
76
75
|
"funding": {
|
|
77
76
|
"type": "opencollective",
|
|
78
77
|
"url": "https://opencollective.com/stdlib"
|