@stdlib/ndarray-base-assert-is-real-floating-point-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 CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2024 The Stdlib Authors.
1
+ Copyright (c) 2016-2026 The Stdlib Authors.
package/README.md CHANGED
@@ -67,7 +67,7 @@ var isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-
67
67
 
68
68
  #### isRealFloatingPointDataType( value )
69
69
 
70
- Tests if an input `value` is a supported ndarray real-valued floating-point data type.
70
+ Tests if an input value is a supported ndarray real-valued floating-point data type.
71
71
 
72
72
  <!-- eslint-disable id-length -->
73
73
 
@@ -190,7 +190,7 @@ See [LICENSE][stdlib-license].
190
190
 
191
191
  ## Copyright
192
192
 
193
- Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
193
+ Copyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].
194
194
 
195
195
  </section>
196
196
 
@@ -203,8 +203,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
203
203
  [npm-image]: http://img.shields.io/npm/v/@stdlib/ndarray-base-assert-is-real-floating-point-data-type.svg
204
204
  [npm-url]: https://npmjs.org/package/@stdlib/ndarray-base-assert-is-real-floating-point-data-type
205
205
 
206
- [test-image]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/actions/workflows/test.yml/badge.svg?branch=v0.2.2
207
- [test-url]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/actions/workflows/test.yml?query=branch:v0.2.2
206
+ [test-image]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/actions/workflows/test.yml/badge.svg?branch=v0.3.0
207
+ [test-url]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/actions/workflows/test.yml?query=branch:v0.3.0
208
208
 
209
209
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/main.svg
210
210
  [coverage-url]: https://codecov.io/github/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type?branch=main
@@ -216,8 +216,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
216
216
 
217
217
  -->
218
218
 
219
- [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
220
- [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
219
+ [chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
220
+ [chat-url]: https://stdlib.zulipchat.com
221
221
 
222
222
  [stdlib]: https://github.com/stdlib-js/stdlib
223
223
 
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";var i=function(a,r){return function(){return r||a((r={exports:{}}).exports,r),r.exports}};var t=i(function(c,e){
2
- var s=require('@stdlib/array-base-assert-contains/dist').factory,o=require('@stdlib/ndarray-dtypes/dist'),n=s(o("real_floating_point"));e.exports=n
3
- });var p=t();module.exports=p;
1
+ "use strict";var i=function(t,r){return function(){return r||t((r={exports:{}}).exports,r),r.exports}};var a=i(function(l,e){
2
+ var n=require('@stdlib/array-base-assert-contains/dist').factory,s=require('@stdlib/ndarray-base-dtype-strings/dist'),o=n(s("real_floating_point"));function u(t){return o(String(t))}e.exports=u
3
+ });var p=a();module.exports=p;
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 real-valued floating-point data type.\n*\n* @name isRealFloatingPointDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray real-valued floating-point data type\n*\n* @example\n* var bool = isRealFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'foo' );\n* // returns false\n*/\nvar isRealFloatingPointDataType = contains( dtypes( 'real_floating_point' ) ); // eslint-disable-line id-length\n\n\n// EXPORTS //\n\nmodule.exports = isRealFloatingPointDataType;\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 real-valued floating-point data type.\n*\n* @module @stdlib/ndarray-base-assert-is-real-floating-point-data-type\n*\n* @example\n* var isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' );\n*\n* var bool = isRealFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( '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,EAA8BF,EAAUC,EAAQ,qBAAsB,CAAE,EAK5EF,EAAO,QAAUG,ICXjB,IAAIC,EAAO,IAKX,OAAO,QAAUA",
6
- "names": ["require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isRealFloatingPointDataType", "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( 'real_floating_point' ) );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray real-valued floating-point data type.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray real-valued floating-point data type\n*\n* @example\n* var bool = isRealFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'foo' );\n* // returns false\n*/\nfunction isRealFloatingPointDataType( v ) { // eslint-disable-line id-length\n\treturn isDataType( String( v ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isRealFloatingPointDataType;\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 real-valued floating-point data type.\n*\n* @module @stdlib/ndarray-base-assert-is-real-floating-point-data-type\n*\n* @example\n* var isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' );\n*\n* var bool = isRealFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( '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,qBAAsB,CAAE,EAgD3D,SAASE,EAA6BC,EAAI,CACzC,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", "isRealFloatingPointDataType", "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( 'real_floating_point' ) );
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 real-valued floating-point data type.
31
36
  *
32
- * @name isRealFloatingPointDataType
33
- * @type {Function}
34
37
  * @param {*} v - value to test
35
38
  * @returns {boolean} boolean indicating whether an input value is a supported ndarray real-valued floating-point data type
36
39
  *
@@ -71,7 +74,9 @@ var dtypes = require( '@stdlib/ndarray-dtypes' );
71
74
  * bool = isRealFloatingPointDataType( 'foo' );
72
75
  * // returns false
73
76
  */
74
- var isRealFloatingPointDataType = contains( dtypes( 'real_floating_point' ) ); // eslint-disable-line id-length
77
+ function isRealFloatingPointDataType( v ) { // eslint-disable-line id-length
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-real-floating-point-data-type",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "Test if an input value is a supported ndarray real-valued floating-point 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.3.0"
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"