@stdlib/strided-base-dtype-enum2str 0.2.2 → 0.2.3

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
@@ -149,6 +149,12 @@ str = enum2str( str2enum( 'uint8' ) );
149
149
 
150
150
  <section class="related">
151
151
 
152
+ * * *
153
+
154
+ ## See Also
155
+
156
+ - <span class="package-name">[`@stdlib/strided-base/dtype-str2enum`][@stdlib/strided/base/dtype-str2enum]</span><span class="delimiter">: </span><span class="description">return the enumeration constant associated with a strided array data type string.</span>
157
+
152
158
  </section>
153
159
 
154
160
  <!-- /.related -->
@@ -179,7 +185,7 @@ See [LICENSE][stdlib-license].
179
185
 
180
186
  ## Copyright
181
187
 
182
- Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
188
+ Copyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].
183
189
 
184
190
  </section>
185
191
 
@@ -192,8 +198,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
192
198
  [npm-image]: http://img.shields.io/npm/v/@stdlib/strided-base-dtype-enum2str.svg
193
199
  [npm-url]: https://npmjs.org/package/@stdlib/strided-base-dtype-enum2str
194
200
 
195
- [test-image]: https://github.com/stdlib-js/strided-base-dtype-enum2str/actions/workflows/test.yml/badge.svg?branch=v0.2.2
196
- [test-url]: https://github.com/stdlib-js/strided-base-dtype-enum2str/actions/workflows/test.yml?query=branch:v0.2.2
201
+ [test-image]: https://github.com/stdlib-js/strided-base-dtype-enum2str/actions/workflows/test.yml/badge.svg?branch=v0.2.3
202
+ [test-url]: https://github.com/stdlib-js/strided-base-dtype-enum2str/actions/workflows/test.yml?query=branch:v0.2.3
197
203
 
198
204
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/strided-base-dtype-enum2str/main.svg
199
205
  [coverage-url]: https://codecov.io/github/stdlib-js/strided-base-dtype-enum2str?branch=main
@@ -205,8 +211,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
205
211
 
206
212
  -->
207
213
 
208
- [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
209
- [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
214
+ [chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
215
+ [chat-url]: https://stdlib.zulipchat.com
210
216
 
211
217
  [stdlib]: https://github.com/stdlib-js/stdlib
212
218
 
@@ -225,6 +231,12 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
225
231
 
226
232
  [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/strided-base-dtype-enum2str/main/LICENSE
227
233
 
234
+ <!-- <related-links> -->
235
+
236
+ [@stdlib/strided/base/dtype-str2enum]: https://www.npmjs.com/package/@stdlib/strided-base-dtype-str2enum
237
+
238
+ <!-- </related-links> -->
239
+
228
240
  </section>
229
241
 
230
242
  <!-- /.links -->
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";var u=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var s=u(function(l,t){
2
- var n=require('@stdlib/utils-object-inverse/dist'),a=require('@stdlib/strided-dtypes/dist').enum,i=n(a(),{duplicates:!1});function v(r){var e=i[r];return typeof e=="string"?e:null}t.exports=v
2
+ var n=require('@stdlib/object-inverse/dist'),a=require('@stdlib/strided-dtypes/dist').enum,i=n(a(),{duplicates:!1});function v(r){var e=i[r];return typeof e=="string"?e:null}t.exports=v
3
3
  });var o=s();module.exports=o;
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) 2021 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 objectInverse = require( '@stdlib/utils-object-inverse' );\nvar enumeration = require( '@stdlib/strided-dtypes' ).enum;\n\n\n// VARIABLES //\n\nvar hash = objectInverse( enumeration(), {\n\t'duplicates': false\n});\n\n\n// MAIN //\n\n/**\n* Returns the data type string associated with a strided array data type enumeration constant.\n*\n* @param {integer} dtype - data type enumeration constant\n* @returns {(string|null)} data type string or null\n*\n* @example\n* var str2enum = require( '@stdlib/strided-base-dtype-str2enum' );\n*\n* var v = str2enum( 'float64' );\n* // returns <number>\n*\n* var dt = enum2str( v );\n* // returns 'float64'\n*/\nfunction enum2str( dtype ) {\n\tvar v = hash[ dtype ];\n\treturn ( typeof v === 'string' ) ? v : null; // note: we include this guard to prevent walking the prototype chain\n}\n\n\n// EXPORTS //\n\nmodule.exports = enum2str;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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* Return the data type string associated with a strided array data type enumeration constant.\n*\n* @module @stdlib/strided-base-dtype-enum2str\n*\n* @example\n* var str2enum = require( '@stdlib/strided-base-dtype-str2enum' );\n* var enum2str = require( '@stdlib/strided-base-dtype-enum2str' );\n*\n* var v = str2enum( 'float64' );\n* // returns <number>\n*\n* var dt = enum2str( v );\n* // returns 'float64'\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,EAAgB,QAAS,8BAA+B,EACxDC,EAAc,QAAS,wBAAyB,EAAE,KAKlDC,EAAOF,EAAeC,EAAY,EAAG,CACxC,WAAc,EACf,CAAC,EAoBD,SAASE,EAAUC,EAAQ,CAC1B,IAAIC,EAAIH,EAAME,CAAM,EACpB,OAAS,OAAOC,GAAM,SAAaA,EAAI,IACxC,CAKAN,EAAO,QAAUI,ICpBjB,IAAIG,EAAO,IAKX,OAAO,QAAUA",
4
+ "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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 objectInverse = require( '@stdlib/object-inverse' );\nvar enumeration = require( '@stdlib/strided-dtypes' ).enum;\n\n\n// VARIABLES //\n\nvar hash = objectInverse( enumeration(), {\n\t'duplicates': false\n});\n\n\n// MAIN //\n\n/**\n* Returns the data type string associated with a strided array data type enumeration constant.\n*\n* @param {integer} dtype - data type enumeration constant\n* @returns {(string|null)} data type string or null\n*\n* @example\n* var str2enum = require( '@stdlib/strided-base-dtype-str2enum' );\n*\n* var v = str2enum( 'float64' );\n* // returns <number>\n*\n* var dt = enum2str( v );\n* // returns 'float64'\n*/\nfunction enum2str( dtype ) {\n\tvar v = hash[ dtype ];\n\treturn ( typeof v === 'string' ) ? v : null; // note: we include this guard to prevent walking the prototype chain\n}\n\n\n// EXPORTS //\n\nmodule.exports = enum2str;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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* Return the data type string associated with a strided array data type enumeration constant.\n*\n* @module @stdlib/strided-base-dtype-enum2str\n*\n* @example\n* var str2enum = require( '@stdlib/strided-base-dtype-str2enum' );\n* var enum2str = require( '@stdlib/strided-base-dtype-enum2str' );\n*\n* var v = str2enum( 'float64' );\n* // returns <number>\n*\n* var dt = enum2str( v );\n* // returns 'float64'\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,EAAgB,QAAS,wBAAyB,EAClDC,EAAc,QAAS,wBAAyB,EAAE,KAKlDC,EAAOF,EAAeC,EAAY,EAAG,CACxC,WAAc,EACf,CAAC,EAoBD,SAASE,EAAUC,EAAQ,CAC1B,IAAIC,EAAIH,EAAME,CAAM,EACpB,OAAS,OAAOC,GAAM,SAAaA,EAAI,IACxC,CAKAN,EAAO,QAAUI,ICpBjB,IAAIG,EAAO,IAKX,OAAO,QAAUA",
6
6
  "names": ["require_main", "__commonJSMin", "exports", "module", "objectInverse", "enumeration", "hash", "enum2str", "dtype", "v", "main"]
7
7
  }
package/lib/main.js CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  // MODULES //
22
22
 
23
- var objectInverse = require( '@stdlib/utils-object-inverse' );
23
+ var objectInverse = require( '@stdlib/object-inverse' );
24
24
  var enumeration = require( '@stdlib/strided-dtypes' ).enum;
25
25
 
26
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/strided-base-dtype-enum2str",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Return the data type string associated with a strided array data type enumeration constant.",
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/strided-dtypes": "^0.2.1",
34
- "@stdlib/utils-object-inverse": "^0.2.2"
33
+ "@stdlib/object-inverse": "^0.1.0",
34
+ "@stdlib/strided-dtypes": "^0.3.0"
35
35
  },
36
36
  "devDependencies": {},
37
37
  "engines": {
@@ -65,7 +65,6 @@
65
65
  "util",
66
66
  "enum"
67
67
  ],
68
- "__stdlib__": {},
69
68
  "funding": {
70
69
  "type": "opencollective",
71
70
  "url": "https://opencollective.com/stdlib"