New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@stdlib/assert-is-arraybuffer-view

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/assert-is-arraybuffer-view - npm Package Compare versions

Comparing version
0.2.2
to
0.2.3
+2
-2
dist/index.js.map
{
"version": 3,
"sources": ["../lib/no_arraybuffer.js", "../lib/polyfill.js", "../lib/main.js", "../lib/index.js"],
"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 constantFunction = require( '@stdlib/utils-constant-function' );\n\n\n// MAIN //\n\nvar isArrayBufferView = constantFunction( false );\n\n\n// EXPORTS //\n\nmodule.exports = isArrayBufferView;\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// MODULES //\n\nvar isTypedArray = require( '@stdlib/assert-is-typed-array' );\nvar isDataView = require( '@stdlib/assert-is-dataview' );\n\n\n// MAIN //\n\n/**\n* Polyfill for determining whether an object is an array buffer view.\n*\n* ## Notes\n*\n* - This polyfill should only be used in environments which do not provide native `ArrayBuffer.isView` support.\n* - The implementation checks whether a value is a data view or typed array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array buffer view\n*\n* @example\n* var Int8Array = require( '@stdlib/array-int8' );\n* var bool = isArrayBufferView( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBufferView( [] );\n* // returns false\n*/\nfunction isArrayBufferView( value ) {\n\treturn isTypedArray( value ) || isDataView( value );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArrayBufferView;\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// MODULES //\n\nvar ArrayBuffer = require( '@stdlib/array-buffer' );\n\n\n// MAIN //\n\n/**\n* Determines whether an object is an array buffer view.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array buffer view\n*\n* @example\n* var Int8Array = require( '@stdlib/array-int8' );\n* var bool = isArrayBufferView( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBufferView( [] );\n* // returns false\n*/\nfunction isArrayBufferView( value ) {\n\treturn ArrayBuffer.isView( value );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArrayBufferView;\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* Test if a value is an `ArrayBuffer` view.\n*\n* @module @stdlib/assert-is-arraybuffer-view\n*\n* @example\n* var isArrayBufferView = require( '@stdlib/assert-is-arraybuffer-view' );\n* var Int32Array = require( '@stdlib/array-int32' );\n*\n* var bool = isArrayBufferView( new Int32Array( 10 ) );\n* // returns true\n*\n* bool = isArrayBufferView( {} );\n* // returns false\n*/\n\n// MODULES //\n\nvar hasArrayBufferSupport = require( '@stdlib/assert-has-arraybuffer-support' );\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar ArrayBuffer = require( '@stdlib/array-buffer' );\nvar noArraybuffer = require( './no_arraybuffer.js' );\nvar polyfill = require( './polyfill.js' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar isArrayBufferView;\nif ( hasArrayBufferSupport() ) {\n\tif ( isFunction( ArrayBuffer.isView ) ) {\n\t\tisArrayBufferView = main;\n\t} else {\n\t\tisArrayBufferView = polyfill;\n\t}\n} else {\n\tisArrayBufferView = noArraybuffer;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArrayBufferView;\n"],
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAmB,QAAS,iCAAkC,EAK9DC,EAAoBD,EAAkB,EAAM,EAKhDD,EAAO,QAAUE,IChCjB,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAe,QAAS,+BAAgC,EACxDC,EAAa,QAAS,4BAA6B,EAyBvD,SAASC,EAAmBC,EAAQ,CACnC,OAAOH,EAAcG,CAAM,GAAKF,EAAYE,CAAM,CACnD,CAKAJ,EAAO,QAAUG,ICvDjB,IAAAE,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,sBAAuB,EAoBlD,SAASC,EAAmBC,EAAQ,CACnC,OAAOF,EAAY,OAAQE,CAAM,CAClC,CAKAH,EAAO,QAAUE,ICXjB,IAAIE,EAAwB,QAAS,wCAAyC,EAC1EC,EAAa,QAAS,4BAA6B,EACnDC,EAAc,QAAS,sBAAuB,EAC9CC,EAAgB,IAChBC,EAAW,IACXC,EAAO,IAKPC,EACCN,EAAsB,EACrBC,EAAYC,EAAY,MAAO,EACnCI,EAAoBD,EAEpBC,EAAoBF,EAGrBE,EAAoBH,EAMrB,OAAO,QAAUG",
"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 constantFunction = require( '@stdlib/utils-constant-function' );\n\n\n// MAIN //\n\nvar isArrayBufferView = constantFunction( false );\n\n\n// EXPORTS //\n\nmodule.exports = isArrayBufferView;\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// MODULES //\n\nvar isTypedArray = require( '@stdlib/assert-is-typed-array' );\nvar isDataView = require( '@stdlib/assert-is-dataview' );\n\n\n// MAIN //\n\n/**\n* Polyfill for determining whether an object is an array buffer view.\n*\n* ## Notes\n*\n* - This polyfill should only be used in environments which do not provide native `ArrayBuffer.isView` support.\n* - The implementation checks whether a value is a data view or typed array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array buffer view\n*\n* @example\n* var Int8Array = require( '@stdlib/array-int8' );\n*\n* var bool = isArrayBufferView( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBufferView( [] );\n* // returns false\n*/\nfunction isArrayBufferView( value ) {\n\treturn isTypedArray( value ) || isDataView( value );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArrayBufferView;\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// MODULES //\n\nvar ArrayBuffer = require( '@stdlib/array-buffer' );\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array buffer view.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array buffer view\n*\n* @example\n* var Int8Array = require( '@stdlib/array-int8' );\n*\n* var bool = isArrayBufferView( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBufferView( [] );\n* // returns false\n*/\nfunction isArrayBufferView( value ) {\n\treturn ArrayBuffer.isView( value );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArrayBufferView;\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* Test if a value is an `ArrayBuffer` view.\n*\n* @module @stdlib/assert-is-arraybuffer-view\n*\n* @example\n* var Int32Array = require( '@stdlib/array-int32' );\n* var isArrayBufferView = require( '@stdlib/assert-is-arraybuffer-view' );\n*\n* var bool = isArrayBufferView( new Int32Array( 10 ) );\n* // returns true\n*\n* bool = isArrayBufferView( {} );\n* // returns false\n*/\n\n// MODULES //\n\nvar hasArrayBufferSupport = require( '@stdlib/assert-has-arraybuffer-support' );\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar ArrayBuffer = require( '@stdlib/array-buffer' );\nvar noArraybuffer = require( './no_arraybuffer.js' );\nvar polyfill = require( './polyfill.js' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar isArrayBufferView;\nif ( hasArrayBufferSupport() ) {\n\tif ( isFunction( ArrayBuffer.isView ) ) {\n\t\tisArrayBufferView = main;\n\t} else {\n\t\tisArrayBufferView = polyfill;\n\t}\n} else {\n\tisArrayBufferView = noArraybuffer;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArrayBufferView;\n"],
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAmB,QAAS,iCAAkC,EAK9DC,EAAoBD,EAAkB,EAAM,EAKhDD,EAAO,QAAUE,IChCjB,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAe,QAAS,+BAAgC,EACxDC,EAAa,QAAS,4BAA6B,EA0BvD,SAASC,EAAmBC,EAAQ,CACnC,OAAOH,EAAcG,CAAM,GAAKF,EAAYE,CAAM,CACnD,CAKAJ,EAAO,QAAUG,ICxDjB,IAAAE,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,sBAAuB,EAqBlD,SAASC,EAAmBC,EAAQ,CACnC,OAAOF,EAAY,OAAQE,CAAM,CAClC,CAKAH,EAAO,QAAUE,ICZjB,IAAIE,EAAwB,QAAS,wCAAyC,EAC1EC,EAAa,QAAS,4BAA6B,EACnDC,EAAc,QAAS,sBAAuB,EAC9CC,EAAgB,IAChBC,EAAW,IACXC,EAAO,IAKPC,EACCN,EAAsB,EACrBC,EAAYC,EAAY,MAAO,EACnCI,EAAoBD,EAEpBC,EAAoBF,EAGrBE,EAAoBH,EAMrB,OAAO,QAAUG",
"names": ["require_no_arraybuffer", "__commonJSMin", "exports", "module", "constantFunction", "isArrayBufferView", "require_polyfill", "__commonJSMin", "exports", "module", "isTypedArray", "isDataView", "isArrayBufferView", "value", "require_main", "__commonJSMin", "exports", "module", "ArrayBuffer", "isArrayBufferView", "value", "hasArrayBufferSupport", "isFunction", "ArrayBuffer", "noArraybuffer", "polyfill", "main", "isArrayBufferView"]
}

@@ -27,4 +27,4 @@ /**

* @example
* var Int32Array = require( '@stdlib/array-int32' );
* var isArrayBufferView = require( '@stdlib/assert-is-arraybuffer-view' );
* var Int32Array = require( '@stdlib/array-int32' );
*

@@ -31,0 +31,0 @@ * var bool = isArrayBufferView( new Int32Array( 10 ) );

@@ -29,3 +29,3 @@ /**

/**
* Determines whether an object is an array buffer view.
* Tests if a value is an array buffer view.
*

@@ -37,2 +37,3 @@ * @param {*} value - value to test

* var Int8Array = require( '@stdlib/array-int8' );
*
* var bool = isArrayBufferView( new Int8Array( 10 ) );

@@ -39,0 +40,0 @@ * // returns true

@@ -42,2 +42,3 @@ /**

* var Int8Array = require( '@stdlib/array-int8' );
*
* var bool = isArrayBufferView( new Int8Array( 10 ) );

@@ -44,0 +45,0 @@ * // returns true

+1
-1

@@ -1,1 +0,1 @@

Copyright (c) 2016-2024 The Stdlib Authors.
Copyright (c) 2016-2026 The Stdlib Authors.
{
"name": "@stdlib/assert-is-arraybuffer-view",
"version": "0.2.2",
"version": "0.2.3",
"description": "Test if a value is an `ArrayBuffer` view.",

@@ -33,7 +33,7 @@ "license": "Apache-2.0",

"dependencies": {
"@stdlib/array-buffer": "^0.2.1",
"@stdlib/array-buffer": "^0.2.2",
"@stdlib/assert-has-arraybuffer-support": "^0.2.2",
"@stdlib/assert-is-dataview": "^0.2.2",
"@stdlib/assert-is-function": "^0.2.2",
"@stdlib/assert-is-typed-array": "^0.2.1",
"@stdlib/assert-is-typed-array": "^0.2.2",
"@stdlib/utils-constant-function": "^0.2.2"

@@ -40,0 +40,0 @@ },

@@ -167,3 +167,3 @@ <!--

Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
Copyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].

@@ -181,4 +181,4 @@ </section>

[test-image]: https://github.com/stdlib-js/assert-is-arraybuffer-view/actions/workflows/test.yml/badge.svg?branch=v0.2.2
[test-url]: https://github.com/stdlib-js/assert-is-arraybuffer-view/actions/workflows/test.yml?query=branch:v0.2.2
[test-image]: https://github.com/stdlib-js/assert-is-arraybuffer-view/actions/workflows/test.yml/badge.svg?branch=v0.2.3
[test-url]: https://github.com/stdlib-js/assert-is-arraybuffer-view/actions/workflows/test.yml?query=branch:v0.2.3

@@ -195,4 +195,4 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/assert-is-arraybuffer-view/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

@@ -199,0 +199,0 @@ [stdlib]: https://github.com/stdlib-js/stdlib