rittenhop-ghost/versions/5.94.2/node_modules/@stdlib/assert-has-int16array-support/dist/index.js.map

8 lines
4.5 KiB
Plaintext
Raw Normal View History

{
"version": 3,
"sources": ["../lib/int16array.js", "../lib/main.js", "../lib/index.js"],
"sourcesContent": ["/**\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// MAIN //\n\nvar main = ( typeof Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\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 isInt16Array = require( '@stdlib/assert-is-int16array' );\nvar INT16_MAX = require( '@stdlib/constants-int16-max' );\nvar INT16_MIN = require( '@stdlib/constants-int16-min' );\nvar GlobalInt16Array = require( './int16array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns <boolean>\n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasInt16ArraySupport;\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* Test for native `Int16Array` support.\n*\n* @module @stdlib/assert-has-int16array-support\n*\n* @example\n* var hasInt16ArraySupport = require( '@stdlib/assert-has-int16array-support' );\n*\n* var bool = hasInt16ArraySupport();\n* // returns <boolean>\n*/\n\n// MODULES //\n\nvar hasInt16ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasInt16ArraySupport;\n"],
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAS,OAAO,YAAe,WAAe,WAAa,KAK/DD,EAAO,QAAUC,IC3BjB,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAe,QAAS,8BAA+B,EACvDC,EAAY,QAAS,6BAA8B,EACnDC,EAAY,QAAS,6BAA8B,EACnDC,EAAmB,IAcvB,SAASC,GAAuB,CAC/B,IAAIC,EACAC,EAEJ,GAAK,OAAOH,GAAqB,WAChC,MAAO,GAGR,GAAI,CACHG,EAAM,IAAIH,EAAkB,CAAE,EAAG,KAAM,MAAOF,EAAU,CAAE,CAAE,EAC5DI,EACCL,EAAcM,CAAI,GAClBA,EAAK,CAAE,IAAM,GACbA,EAAK,CAAE,IAAM,GACbA,EAAK,CAAE,IAAM,IACbA,EAAK,CAAE,IAAMJ,CAEf,OAAUK,EAAM,CACfF,EAAO,EACR,CACA,OAAOA,CACR,CAKAN,EAAO,QAAUK,IC/BjB,IAAII,EAAuB,IAK3B,OAAO,QAAUA",
"names": ["require_int16array", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isInt16Array", "INT16_MAX", "INT16_MIN", "GlobalInt16Array", "hasInt16ArraySupport", "bool", "arr", "err", "hasInt16ArraySupport"]
}