@stdlib/array-dtypes
Advanced tools
+3
-3
@@ -1,6 +0,6 @@ | ||
| "use strict";var e=function(i,t){return function(){return t||i((t={exports:{}}).exports,t),t.exports}};var l=e(function(m,c){c.exports={all:["bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["bool","complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex64","complex128","float32","float64"],real_floating_point:["float32","float64"],complex_floating_point:["complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"]}});var r=e(function(x,a){ | ||
| var f=require('@stdlib/string-base-replace/dist'),o=l(),u=/_and_generic$/;function p(){var i,t,n;return arguments.length===0?o.all.slice():(n=!1,i=arguments[0],u.test(i)&&(i=f(i,u,""),i!=="all"&&(n=!0)),t=o[i],t=t?t.slice():[],n&&t.length>0&&t.push("generic"),t)}a.exports=p | ||
| });var s=r();module.exports=s; | ||
| "use strict";var e=function(i,t){return function(){return t||i((t={exports:{}}).exports,t),t.exports}};var o=e(function(s,c){c.exports={all:["bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["bool","complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex64","complex128","float32","float64"],real_floating_point:["float32","float64"],complex_floating_point:["complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],index:["int32","uint8","bool","generic"],integer_index:["int32"],boolean_index:["bool"],mask_index:["uint8"],typed_index:["int32","uint8","bool"]}});var r=e(function(m,a){ | ||
| var f=require('@stdlib/string-base-replace/dist'),l=o(),u=/_and_generic$/;function p(){var i,t,n;return arguments.length===0?l.all.slice():(n=!1,i=arguments[0],u.test(i)&&(i=f(i,u,""),i!=="all"&&i!=="index"&&(n=!0)),t=l[i],t=t?t.slice():[],n&&t.length>0&&t.push("generic"),t)}a.exports=p | ||
| });var x=r();module.exports=x; | ||
| /** @license Apache-2.0 */ | ||
| /** @license Apache-2.0 */ | ||
| //# sourceMappingURL=index.js.map |
| { | ||
| "version": 3, | ||
| "sources": ["../lib/dtypes.json", "../lib/main.js", "../lib/index.js"], | ||
| "sourcesContent": ["{\n \"all\": [\n \"bool\",\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\",\n \"generic\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"typed\": [\n \"bool\",\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"floating_point\": [\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\"\n ],\n \"real_floating_point\": [\n \"float32\",\n \"float64\"\n ],\n \"complex_floating_point\": [\n \"complex64\",\n \"complex128\"\n ],\n \"boolean\": [\n \"bool\"\n ],\n \"integer\": [\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"signed_integer\": [\n \"int16\",\n \"int32\",\n \"int8\"\n ],\n \"unsigned_integer\": [\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"real\": [\n \"float32\",\n \"float64\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"numeric\": [\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ]\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 replace = require( '@stdlib/string-base-replace' );\nvar DTYPES = require( './dtypes.json' );\n\n\n// VARIABLES //\n\nvar RE_SUFFIX = /_and_generic$/;\n\n\n// MAIN //\n\n/**\n* Returns a list of array data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of array data types\n*\n* @example\n* var list = dtypes();\n* // e.g., returns [ 'float32', 'float64', ... ]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar kind;\n\tvar out;\n\tvar FLG;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tFLG = false;\n\tkind = arguments[ 0 ];\n\tif ( RE_SUFFIX.test( kind ) ) {\n\t\tkind = replace( kind, RE_SUFFIX, '' );\n\t\tif ( kind !== 'all' ) {\n\t\t\tFLG = true;\n\t\t}\n\t}\n\tout = DTYPES[ kind ];\n\tout = ( out ) ? out.slice() : [];\n\tif ( FLG && out.length > 0 ) {\n\t\tout.push( 'generic' );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 a list of array data types.\n*\n* @module @stdlib/array-dtypes\n*\n* @example\n* var dtypes = require( '@stdlib/array-dtypes' );\n*\n* var list = dtypes();\n* // e.g., returns [ 'float32', 'float64', 'generic', 'int16', 'int32', 'int8', 'uint16', 'uint32', 'uint8', 'uint8c', 'complex128', 'complex64', 'bool' ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], | ||
| "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,CAAAA,EAAA,SACE,IAAO,CACL,OACA,YACA,aACA,UACA,UACA,UACA,QACA,QACA,OACA,SACA,SACA,QACA,QACF,EACA,MAAS,CACP,OACA,YACA,aACA,UACA,UACA,QACA,QACA,OACA,SACA,SACA,QACA,QACF,EACA,eAAkB,CAChB,YACA,aACA,UACA,SACF,EACA,oBAAuB,CACrB,UACA,SACF,EACA,uBAA0B,CACxB,YACA,YACF,EACA,QAAW,CACT,MACF,EACA,QAAW,CACT,QACA,QACA,OACA,SACA,SACA,QACA,QACF,EACA,eAAkB,CAChB,QACA,QACA,MACF,EACA,iBAAoB,CAClB,SACA,SACA,QACA,QACF,EACA,KAAQ,CACN,UACA,UACA,QACA,QACA,OACA,SACA,SACA,QACA,QACF,EACA,QAAW,CACT,YACA,aACA,UACA,UACA,QACA,QACA,OACA,SACA,SACA,QACA,QACF,CACF,IC3FA,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAU,QAAS,6BAA8B,EACjDC,EAAS,IAKTC,EAAY,gBAmBhB,SAASC,GAAS,CACjB,IAAIC,EACAC,EACAC,EACJ,OAAK,UAAU,SAAW,EAClBL,EAAO,IAAI,MAAM,GAEzBK,EAAM,GACNF,EAAO,UAAW,CAAE,EACfF,EAAU,KAAME,CAAK,IACzBA,EAAOJ,EAASI,EAAMF,EAAW,EAAG,EAC/BE,IAAS,QACbE,EAAM,KAGRD,EAAMJ,EAAQG,CAAK,EACnBC,EAAQA,EAAQA,EAAI,MAAM,EAAI,CAAC,EAC1BC,GAAOD,EAAI,OAAS,GACxBA,EAAI,KAAM,SAAU,EAEdA,EACR,CAKAN,EAAO,QAAUI,ICvCjB,IAAII,EAAO,IAKX,OAAO,QAAUA", | ||
| "sourcesContent": ["{\n \"all\": [\n \"bool\",\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\",\n \"generic\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"typed\": [\n \"bool\",\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"floating_point\": [\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\"\n ],\n \"real_floating_point\": [\n \"float32\",\n \"float64\"\n ],\n \"complex_floating_point\": [\n \"complex64\",\n \"complex128\"\n ],\n \"boolean\": [\n \"bool\"\n ],\n \"integer\": [\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"signed_integer\": [\n \"int16\",\n \"int32\",\n \"int8\"\n ],\n \"unsigned_integer\": [\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"real\": [\n \"float32\",\n \"float64\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"numeric\": [\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"index\": [\n \"int32\",\n \"uint8\",\n \"bool\",\n \"generic\"\n ],\n \"integer_index\": [\n \"int32\"\n ],\n \"boolean_index\": [\n \"bool\"\n ],\n \"mask_index\": [\n \"uint8\"\n ],\n \"typed_index\": [\n \"int32\",\n \"uint8\",\n \"bool\"\n ]\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 replace = require( '@stdlib/string-base-replace' );\nvar DTYPES = require( './dtypes.json' );\n\n\n// VARIABLES //\n\nvar RE_SUFFIX = /_and_generic$/;\n\n\n// MAIN //\n\n/**\n* Returns a list of array data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of array data types\n*\n* @example\n* var list = dtypes();\n* // e.g., returns [ 'float32', 'float64', ... ]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar kind;\n\tvar out;\n\tvar FLG;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tFLG = false;\n\tkind = arguments[ 0 ];\n\tif ( RE_SUFFIX.test( kind ) ) {\n\t\tkind = replace( kind, RE_SUFFIX, '' );\n\t\tif ( kind !== 'all' && kind !== 'index' ) {\n\t\t\tFLG = true;\n\t\t}\n\t}\n\tout = DTYPES[ kind ];\n\tout = ( out ) ? out.slice() : [];\n\tif ( FLG && out.length > 0 ) {\n\t\tout.push( 'generic' );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 a list of array data types.\n*\n* @module @stdlib/array-dtypes\n*\n* @example\n* var dtypes = require( '@stdlib/array-dtypes' );\n*\n* var list = dtypes();\n* // e.g., returns [ 'float32', 'float64', 'generic', 'int16', 'int32', 'int8', 'uint16', 'uint32', 'uint8', 'uint8c', 'complex128', 'complex64', 'bool' ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], | ||
| "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,CAAAA,EAAA,SACE,IAAO,CACL,OACA,YACA,aACA,UACA,UACA,UACA,QACA,QACA,OACA,SACA,SACA,QACA,QACF,EACA,MAAS,CACP,OACA,YACA,aACA,UACA,UACA,QACA,QACA,OACA,SACA,SACA,QACA,QACF,EACA,eAAkB,CAChB,YACA,aACA,UACA,SACF,EACA,oBAAuB,CACrB,UACA,SACF,EACA,uBAA0B,CACxB,YACA,YACF,EACA,QAAW,CACT,MACF,EACA,QAAW,CACT,QACA,QACA,OACA,SACA,SACA,QACA,QACF,EACA,eAAkB,CAChB,QACA,QACA,MACF,EACA,iBAAoB,CAClB,SACA,SACA,QACA,QACF,EACA,KAAQ,CACN,UACA,UACA,QACA,QACA,OACA,SACA,SACA,QACA,QACF,EACA,QAAW,CACT,YACA,aACA,UACA,UACA,QACA,QACA,OACA,SACA,SACA,QACA,QACF,EACA,MAAS,CACP,QACA,QACA,OACA,SACF,EACA,cAAiB,CACf,OACF,EACA,cAAiB,CACf,MACF,EACA,WAAc,CACZ,OACF,EACA,YAAe,CACb,QACA,QACA,MACF,CACF,IC/GA,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAU,QAAS,6BAA8B,EACjDC,EAAS,IAKTC,EAAY,gBAmBhB,SAASC,GAAS,CACjB,IAAIC,EACAC,EACAC,EACJ,OAAK,UAAU,SAAW,EAClBL,EAAO,IAAI,MAAM,GAEzBK,EAAM,GACNF,EAAO,UAAW,CAAE,EACfF,EAAU,KAAME,CAAK,IACzBA,EAAOJ,EAASI,EAAMF,EAAW,EAAG,EAC/BE,IAAS,OAASA,IAAS,UAC/BE,EAAM,KAGRD,EAAMJ,EAAQG,CAAK,EACnBC,EAAQA,EAAQA,EAAI,MAAM,EAAI,CAAC,EAC1BC,GAAOD,EAAI,OAAS,GACxBA,EAAI,KAAM,SAAU,EAEdA,EACR,CAKAN,EAAO,QAAUI,ICvCjB,IAAII,EAAO,IAKX,OAAO,QAAUA", | ||
| "names": ["require_dtypes", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "replace", "DTYPES", "RE_SUFFIX", "dtypes", "kind", "out", "FLG", "main"] | ||
| } |
+20
-0
@@ -91,3 +91,23 @@ { | ||
| "uint8c" | ||
| ], | ||
| "index": [ | ||
| "int32", | ||
| "uint8", | ||
| "bool", | ||
| "generic" | ||
| ], | ||
| "integer_index": [ | ||
| "int32" | ||
| ], | ||
| "boolean_index": [ | ||
| "bool" | ||
| ], | ||
| "mask_index": [ | ||
| "uint8" | ||
| ], | ||
| "typed_index": [ | ||
| "int32", | ||
| "uint8", | ||
| "bool" | ||
| ] | ||
| } |
+1
-1
@@ -59,3 +59,3 @@ /** | ||
| kind = replace( kind, RE_SUFFIX, '' ); | ||
| if ( kind !== 'all' ) { | ||
| if ( kind !== 'all' && kind !== 'index' ) { | ||
| FLG = true; | ||
@@ -62,0 +62,0 @@ } |
+1
-1
@@ -1,1 +0,1 @@ | ||
| Copyright (c) 2016-2024 The Stdlib Authors. | ||
| Copyright (c) 2016-2026 The Stdlib Authors. |
+1
-2
| { | ||
| "name": "@stdlib/array-dtypes", | ||
| "version": "0.3.0", | ||
| "version": "0.4.0", | ||
| "description": "List of array data types.", | ||
@@ -66,3 +66,2 @@ "license": "Apache-2.0", | ||
| ], | ||
| "__stdlib__": {}, | ||
| "funding": { | ||
@@ -69,0 +68,0 @@ "type": "opencollective", |
+10
-5
@@ -110,2 +110,7 @@ <!-- | ||
| - `typed`: typed data types. | ||
| - `integer_index`: integer index data types. | ||
| - `boolean_index`: boolean index data types. | ||
| - `mask_index`: mask index data types. | ||
| - `typed_index`: typed index data types. | ||
| - `index`: index data types. | ||
| - `all`: all data types. | ||
@@ -212,3 +217,3 @@ | ||
| Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. | ||
| Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors]. | ||
@@ -226,4 +231,4 @@ </section> | ||
| [test-image]: https://github.com/stdlib-js/array-dtypes/actions/workflows/test.yml/badge.svg?branch=v0.3.0 | ||
| [test-url]: https://github.com/stdlib-js/array-dtypes/actions/workflows/test.yml?query=branch:v0.3.0 | ||
| [test-image]: https://github.com/stdlib-js/array-dtypes/actions/workflows/test.yml/badge.svg?branch=v0.4.0 | ||
| [test-url]: https://github.com/stdlib-js/array-dtypes/actions/workflows/test.yml?query=branch:v0.4.0 | ||
@@ -240,4 +245,4 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/array-dtypes/main.svg | ||
| [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg | ||
| [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im | ||
| [chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg | ||
| [chat-url]: https://stdlib.zulipchat.com | ||
@@ -244,0 +249,0 @@ [stdlib]: https://github.com/stdlib-js/stdlib |
33362
3.2%257
8.9%273
1.87%