diff --git a/array/coverage.ndjson b/array/coverage.ndjson index ff2ce8bca..2ebf3ae59 100644 --- a/array/coverage.ndjson +++ b/array/coverage.ndjson @@ -2,3 +2,4 @@ [712,712,100,1,1,100,0,0,100,712,712,100,"de73ae19f43cbad40036d25b1d46620b3c5113a9","2023-08-25 16:40:46 -0700"] [712,712,100,1,1,100,0,0,100,712,712,100,"8482c0a4ed75ea8cc40ae22a1e1ee1a5de595269","2023-12-31 03:42:20 -0800"] [712,712,100,1,1,100,0,0,100,712,712,100,"cf1ec758b8476b43e90df835af6e545a41890cfd","2023-12-31 03:49:21 -0800"] +[721,721,100,1,1,100,0,0,100,721,721,100,"94a238318c73272acb232ac6066f596e07a8752d","2024-01-04 22:22:23 -0800"] diff --git a/array/defaults/coverage.ndjson b/array/defaults/coverage.ndjson new file mode 100644 index 000000000..57fe64ea1 --- /dev/null +++ b/array/defaults/coverage.ndjson @@ -0,0 +1 @@ +[161,161,100,5,6,83.3333,2,2,100,161,161,100,"94a238318c73272acb232ac6066f596e07a8752d","2024-01-04 22:22:23 -0800"] diff --git a/array/defaults/get.js.html b/array/defaults/get.js.html new file mode 100644 index 000000000..f9721183c --- /dev/null +++ b/array/defaults/get.js.html @@ -0,0 +1,271 @@ + + + + +
++ Press n or j to go to the next uncovered block, b, p or k for the previous block. +
+ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 | 2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +9x +9x +9x +9x +2x +2x +2x +2x +2x + | /**
+* @license Apache-2.0
+*
+* Copyright (c) 2023 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var defaults = require( './main.js' );
+
+
+// VARIABLES //
+
+var DEFAULTS = defaults();
+var HASH = {
+ 'dtypes.default': DEFAULTS.dtypes.default,
+ 'dtypes.numeric': DEFAULTS.dtypes.numeric,
+ 'dtypes.real': DEFAULTS.dtypes.real,
+ 'dtypes.floating_point': DEFAULTS.dtypes.floating_point,
+ 'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,
+ 'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,
+ 'dtypes.integer': DEFAULTS.dtypes.integer,
+ 'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,
+ 'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer
+};
+
+
+// MAIN //
+
+/**
+* Returns a default array setting.
+*
+* @param {string} name - setting name
+* @returns {*} default setting or null
+*
+* @example
+* var v = get( 'dtypes.default' );
+* // returns <string>
+*/
+function get( name ) {
+ var v = HASH[ name ];
+ return ( v === void 0 ) ? null : v;
+}
+
+
+// EXPORTS //
+
+module.exports = get;
+ |
+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +
+ +File | ++ | Statements | ++ | Branches | ++ | Functions | ++ | Lines | ++ |
---|---|---|---|---|---|---|---|---|---|
get.js | +
+
+ |
+ 100% | +62/62 | +66.66% | +2/3 | +100% | +1/1 | +100% | +62/62 | +
index.js | +
+
+ |
+ 100% | +47/47 | +100% | +1/1 | +100% | +0/0 | +100% | +47/47 | +
main.js | +
+
+ |
+ 100% | +52/52 | +100% | +2/2 | +100% | +1/1 | +100% | +52/52 | +
+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +
+ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 | 1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x + | /** +* @license Apache-2.0 +* +* Copyright (c) 2023 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Return default array settings. +* +* @module @stdlib/array/defaults +* +* @example +* var defaults = require( '@stdlib/array/defaults' ); +* +* var o = defaults(); +* // returns {...} +*/ + +// MODULES // + +var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var main = require( './main.js' ); +var get = require( './get.js' ); + + +// MAIN // + +setReadOnly( main, 'get', get ); + + +// EXPORTS // + +module.exports = main; + |
+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +
+ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 | 3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +4x +4x +4x +4x +4x +4x +4x +4x +4x +4x +4x +4x +4x +4x +4x +4x +3x +3x +3x +3x +3x + | /** +* @license Apache-2.0 +* +* Copyright (c) 2023 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MAIN // + +/** +* Returns default array settings. +* +* @returns {Object} defaults +* +* @example +* var o = defaults(); +* // returns {...} +*/ +function defaults() { + return { + // Data types: + 'dtypes': { + 'default': 'float64', + 'numeric': 'float64', + 'real': 'float64', + 'floating_point': 'float64', + 'real_floating_point': 'float64', + 'complex_floating_point': 'complex128', + 'integer': 'int32', + 'signed_integer': 'int32', + 'unsigned_integer': 'uint32' + } + }; +} + + +// EXPORTS // + +module.exports = defaults; + |