@stdlib/ndarray-base-assert-is-signed-integer-data-type 0.2.1 → 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 CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2024 The Stdlib Authors.
1
+ Copyright (c) 2016-2026 The Stdlib Authors.
package/README.md CHANGED
@@ -65,7 +65,7 @@ var isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-in
65
65
 
66
66
  #### isSignedIntegerDataType( value )
67
67
 
68
- Tests if an input `value` is a supported ndarray signed integer data type.
68
+ Tests if an input value is a supported ndarray signed integer data type.
69
69
 
70
70
  ```javascript
71
71
  var bool = isSignedIntegerDataType( 'float32' );
@@ -184,7 +184,7 @@ See [LICENSE][stdlib-license].
184
184
 
185
185
  ## Copyright
186
186
 
187
- Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
187
+ Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
188
188
 
189
189
  </section>
190
190
 
@@ -197,8 +197,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
197
197
  [npm-image]: http://img.shields.io/npm/v/@stdlib/ndarray-base-assert-is-signed-integer-data-type.svg
198
198
  [npm-url]: https://npmjs.org/package/@stdlib/ndarray-base-assert-is-signed-integer-data-type
199
199
 
200
- [test-image]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/actions/workflows/test.yml/badge.svg?branch=v0.2.1
201
- [test-url]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/actions/workflows/test.yml?query=branch:v0.2.1
200
+ [test-image]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-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-signed-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-signed-integer-data-type/main.svg
204
204
  [coverage-url]: https://codecov.io/github/stdlib-js/ndarray-base-assert-is-signed-integer-data-type?branch=main
@@ -210,8 +210,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
210
210
 
211
211
  -->
212
212
 
213
- [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
214
- [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
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 s=function(i,e){return function(){return e||i((e={exports:{}}).exports,e),e.exports}};var t=s(function(o,r){
2
- var a=require('@stdlib/array-base-assert-contains/dist').factory,n=require('@stdlib/ndarray-dtypes/dist'),u=a(n("signed_integer"));r.exports=u
3
- });var c=t();module.exports=c;
1
+ "use strict";var a=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var i=a(function(p,t){
2
+ var n=require('@stdlib/array-base-assert-contains/dist').factory,s=require('@stdlib/ndarray-base-dtype-strings/dist'),u=n(s("signed_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 signed integer data type.\n*\n* @name isSignedIntegerDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray signed integer data type\n*\n* @example\n* var bool = isSignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'uint16' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8c' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'foo' );\n* // returns false\n*/\nvar isSignedIntegerDataType = contains( dtypes( 'signed_integer' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isSignedIntegerDataType;\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 signed integer data type.\n*\n* @module @stdlib/ndarray-base-assert-is-signed-integer-data-type\n*\n* @example\n* var isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' );\n*\n* var bool = isSignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'uint16' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8c' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( '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,wBAAyB,EAkD3CC,EAA0BF,EAAUC,EAAQ,gBAAiB,CAAE,EAKnEF,EAAO,QAAUG,ICXjB,IAAIC,EAAO,IAKX,OAAO,QAAUA",
6
- "names": ["require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isSignedIntegerDataType", "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( 'signed_integer' ) );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray signed integer data type.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray signed integer data type\n*\n* @example\n* var bool = isSignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'uint16' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8c' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'foo' );\n* // returns false\n*/\nfunction isSignedIntegerDataType( v ) {\n\treturn isDataType( String( v ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isSignedIntegerDataType;\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 signed integer data type.\n*\n* @module @stdlib/ndarray-base-assert-is-signed-integer-data-type\n*\n* @example\n* var isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' );\n*\n* var bool = isSignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'uint16' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8c' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( '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,gBAAiB,CAAE,EAgDtD,SAASE,EAAyBC,EAAI,CACrC,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", "isSignedIntegerDataType", "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-dtypes' );
24
+ var dtypes = require( '@stdlib/ndarray-base-dtype-strings' );
25
+
26
+
27
+ // VARIABLES //
28
+
29
+ var isDataType = contains( dtypes( 'signed_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 signed integer data type.
31
36
  *
32
- * @name isSignedIntegerDataType
33
- * @type {Function}
34
37
  * @param {*} v - value to test
35
38
  * @returns {boolean} boolean indicating whether an input value is a supported ndarray signed integer data type
36
39
  *
@@ -71,7 +74,9 @@ var dtypes = require( '@stdlib/ndarray-dtypes' );
71
74
  * bool = isSignedIntegerDataType( 'foo' );
72
75
  * // returns false
73
76
  */
74
- var isSignedIntegerDataType = contains( dtypes( 'signed_integer' ) );
77
+ function isSignedIntegerDataType( 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-signed-integer-data-type",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Test if an input value is a supported ndarray signed 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.1",
34
- "@stdlib/ndarray-dtypes": "^0.2.1"
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"