@stdlib/ndarray-index-modes
Advanced tools
| { | ||
| "version": 3, | ||
| "sources": ["../lib/modes.json", "../lib/main.js", "../lib/enum.js", "../lib/index.js"], | ||
| "sourcesContent": ["[\n\t\"throw\",\n \"normalize\",\n\t\"clamp\",\n\t\"wrap\"\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 MODES = require( './modes.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray index modes.\n*\n* @returns {StringArray} list of ndarray index modes\n*\n* @example\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\nfunction modes() {\n\treturn MODES.slice();\n}\n\n\n// EXPORTS //\n\nmodule.exports = modes;\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// MAIN //\n\n/**\n* Returns an object mapping supported index modes to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `throw == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported index modes to integer values\n*\n* @example\n* var table = enumerated();\n* // returns <Object>\n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `index_modes.h` enumeration!!!!\n\treturn {\n\t\t'throw': 1,\n\t\t'clamp': 2,\n\t\t'wrap': 3,\n\t\t'normalize': 4\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumerated;\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/**\n* Return a list of ndarray index modes.\n*\n* @module @stdlib/ndarray-index-modes\n*\n* @example\n* var modes = require( '@stdlib/ndarray-index-modes' );\n*\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar modes = require( './main.js' );\nvar enumeration = require( './enum.js' );\n\n\n// MAIN //\n\nsetReadOnly( modes, 'enum', enumeration );\n\n\n// EXPORTS //\n\nmodule.exports = modes;\n"], | ||
| "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,CAAAA,EAAA,SACC,QACC,YACD,QACA,MACD,ICLA,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAQ,IAcZ,SAASC,GAAQ,CAChB,OAAOD,EAAM,MAAM,CACpB,CAKAD,EAAO,QAAUE,IC3CjB,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAoCA,SAASC,GAAa,CAErB,MAAO,CACN,MAAS,EACT,MAAS,EACT,KAAQ,EACR,UAAa,CACd,CACD,CAKAD,EAAO,QAAUC,ICfjB,IAAIC,EAAc,QAAS,uDAAwD,EAC/EC,EAAQ,IACRC,EAAc,IAKlBF,EAAaC,EAAO,OAAQC,CAAY,EAKxC,OAAO,QAAUD", | ||
| "sourcesContent": ["[\n \"throw\",\n \"normalize\",\n \"clamp\",\n \"wrap\"\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 MODES = require( './modes.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray index modes.\n*\n* @returns {StringArray} list of ndarray index modes\n*\n* @example\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\nfunction modes() {\n\treturn MODES.slice();\n}\n\n\n// EXPORTS //\n\nmodule.exports = modes;\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// MAIN //\n\n/**\n* Returns an object mapping supported index modes to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `throw == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported index modes to integer values\n*\n* @example\n* var table = enumerated();\n* // returns <Object>\n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `index_modes.h` enumeration!!!!\n\treturn {\n\t\t'throw': 1,\n\t\t'clamp': 2,\n\t\t'wrap': 3,\n\t\t'normalize': 4\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumerated;\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/**\n* Return a list of ndarray index modes.\n*\n* @module @stdlib/ndarray-index-modes\n*\n* @example\n* var modes = require( '@stdlib/ndarray-index-modes' );\n*\n* var list = modes();\n* // returns [ 'throw', 'normalize', 'clamp', 'wrap' ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar modes = require( './main.js' );\nvar enumeration = require( './enum.js' );\n\n\n// MAIN //\n\nsetReadOnly( modes, 'enum', enumeration );\n\n\n// EXPORTS //\n\nmodule.exports = modes;\n"], | ||
| "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,CAAAA,EAAA,SACE,QACA,YACA,QACA,MACF,ICLA,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAQ,IAcZ,SAASC,GAAQ,CAChB,OAAOD,EAAM,MAAM,CACpB,CAKAD,EAAO,QAAUE,IC3CjB,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAoCA,SAASC,GAAa,CAErB,MAAO,CACN,MAAS,EACT,MAAS,EACT,KAAQ,EACR,UAAa,CACd,CACD,CAKAD,EAAO,QAAUC,ICfjB,IAAIC,EAAc,QAAS,uDAAwD,EAC/EC,EAAQ,IACRC,EAAc,IAKlBF,EAAaC,EAAO,OAAQC,CAAY,EAKxC,OAAO,QAAUD", | ||
| "names": ["require_modes", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "MODES", "modes", "require_enum", "__commonJSMin", "exports", "module", "enumerated", "setReadOnly", "modes", "enumeration"] | ||
| } |
+3
-3
| [ | ||
| "throw", | ||
| "throw", | ||
| "normalize", | ||
| "clamp", | ||
| "wrap" | ||
| "clamp", | ||
| "wrap" | ||
| ] |
+34
-34
| { | ||
| "options": {}, | ||
| "fields": [ | ||
| { | ||
| "field": "src", | ||
| "resolve": true, | ||
| "relative": true | ||
| }, | ||
| { | ||
| "field": "include", | ||
| "resolve": true, | ||
| "relative": true | ||
| }, | ||
| { | ||
| "field": "libraries", | ||
| "resolve": false, | ||
| "relative": false | ||
| }, | ||
| { | ||
| "field": "libpath", | ||
| "resolve": true, | ||
| "relative": false | ||
| } | ||
| ], | ||
| "confs": [ | ||
| { | ||
| "src": [], | ||
| "include": [ | ||
| "./include" | ||
| ], | ||
| "libraries": [], | ||
| "libpath": [], | ||
| "dependencies": [] | ||
| } | ||
| ] | ||
| "options": {}, | ||
| "fields": [ | ||
| { | ||
| "field": "src", | ||
| "resolve": true, | ||
| "relative": true | ||
| }, | ||
| { | ||
| "field": "include", | ||
| "resolve": true, | ||
| "relative": true | ||
| }, | ||
| { | ||
| "field": "libraries", | ||
| "resolve": false, | ||
| "relative": false | ||
| }, | ||
| { | ||
| "field": "libpath", | ||
| "resolve": true, | ||
| "relative": false | ||
| } | ||
| ], | ||
| "confs": [ | ||
| { | ||
| "src": [], | ||
| "include": [ | ||
| "./include" | ||
| ], | ||
| "libraries": [], | ||
| "libpath": [], | ||
| "dependencies": [] | ||
| } | ||
| ] | ||
| } |
+1
-1
@@ -1,1 +0,1 @@ | ||
| Copyright (c) 2016-2024 The Stdlib Authors. | ||
| Copyright (c) 2016-2026 The Stdlib Authors. |
+2
-3
| { | ||
| "name": "@stdlib/ndarray-index-modes", | ||
| "version": "0.2.2", | ||
| "version": "0.2.3", | ||
| "description": "List of ndarray index modes.", | ||
@@ -34,3 +34,3 @@ "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2" | ||
| "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3" | ||
| }, | ||
@@ -72,3 +72,2 @@ "devDependencies": {}, | ||
| ], | ||
| "__stdlib__": {}, | ||
| "funding": { | ||
@@ -75,0 +74,0 @@ "type": "opencollective", |
+5
-5
@@ -184,3 +184,3 @@ <!-- | ||
| Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. | ||
| Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors]. | ||
@@ -198,4 +198,4 @@ </section> | ||
| [test-image]: https://github.com/stdlib-js/ndarray-index-modes/actions/workflows/test.yml/badge.svg?branch=v0.2.2 | ||
| [test-url]: https://github.com/stdlib-js/ndarray-index-modes/actions/workflows/test.yml?query=branch:v0.2.2 | ||
| [test-image]: https://github.com/stdlib-js/ndarray-index-modes/actions/workflows/test.yml/badge.svg?branch=v0.2.3 | ||
| [test-url]: https://github.com/stdlib-js/ndarray-index-modes/actions/workflows/test.yml?query=branch:v0.2.3 | ||
@@ -212,4 +212,4 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/ndarray-index-modes/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 | ||
@@ -216,0 +216,0 @@ [stdlib]: https://github.com/stdlib-js/stdlib |
31457
0.14%