@stdlib/array-buffer
Advanced tools
Sorry, the diff of this file is not supported yet
| /// <reference path="../docs/types/index.d.ts" /> | ||
| import ArrayBuffer from '../docs/types/index'; | ||
| export = ArrayBuffer; |
| "use strict";var t=function(s,r){return function(){return r||s((r={exports:{}}).exports,r),r.exports}};var o=t(function(y,i){"use strict";var a=typeof ArrayBuffer=="function"?ArrayBuffer:void 0;i.exports=a});var f=t(function(q,u){"use strict";function l(){throw new Error("not implemented")}u.exports=l});var p=require("@stdlib/assert-has-arraybuffer-support"),n=o(),c=f(),e;p()?e=n:e=c;module.exports=e; | ||
| /** | ||
| * @license Apache-2.0 | ||
| * | ||
| * Copyright (c) 2018 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. | ||
| */ | ||
| //# sourceMappingURL=index.js.map |
| { | ||
| "version": 3, | ||
| "sources": ["../lib/main.js", "../lib/polyfill.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 ctor = ( typeof ArrayBuffer === 'function' ) ? ArrayBuffer : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\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// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Constructor which returns an object used to represent a generic, fixed-length raw binary data buffer.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\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* Constructor which returns an object used to represent a generic, fixed-length raw binary data buffer.\n*\n* @module @stdlib/array-buffer\n*\n* @example\n* var ctor = require( '@stdlib/array-buffer' );\n*\n* var buf = new ctor( 10 );\n* // returns <ArrayBuffer>\n*/\n\n// MODULES //\n\nvar hasArrayBufferSupport = require( '@stdlib/assert-has-arraybuffer-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasArrayBufferSupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n"], | ||
| "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAS,OAAO,aAAgB,WAAe,YAAc,OAKjED,EAAO,QAAUC,IC3BjB,IAAAC,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cA6BA,SAASC,GAAW,CACnB,MAAM,IAAI,MAAO,iBAAkB,CACpC,CAKAD,EAAO,QAAUC,ICFjB,IAAIC,EAAwB,QAAS,wCAAyC,EAC1EC,EAAU,IACVC,EAAW,IAKXC,EACCH,EAAsB,EAC1BG,EAAOF,EAEPE,EAAOD,EAMR,OAAO,QAAUC", | ||
| "names": ["require_main", "__commonJSMin", "exports", "module", "ctor", "require_polyfill", "__commonJSMin", "exports", "module", "polyfill", "hasArrayBufferSupport", "builtin", "polyfill", "ctor"] | ||
| } |
+28
| /** | ||
| * @license Apache-2.0 | ||
| * | ||
| * Copyright (c) 2018 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 // | ||
| var ctor = ( typeof ArrayBuffer === 'function' ) ? ArrayBuffer : void 0; // eslint-disable-line stdlib/require-globals | ||
| // EXPORTS // | ||
| module.exports = ctor; |
@@ -19,3 +19,3 @@ /* | ||
| // TypeScript Version: 2.0 | ||
| // TypeScript Version: 4.1 | ||
@@ -22,0 +22,0 @@ // EXPORTS // |
+1
-1
@@ -36,3 +36,3 @@ /** | ||
| var hasArrayBufferSupport = require( '@stdlib/assert-has-arraybuffer-support' ); | ||
| var builtin = require( './arraybuffer.js' ); | ||
| var builtin = require( './main.js' ); | ||
| var polyfill = require( './polyfill.js' ); | ||
@@ -39,0 +39,0 @@ |
+0
-304
@@ -178,305 +178,1 @@ | ||
| END OF TERMS AND CONDITIONS | ||
| Boost Software License - Version 1.0 - August 17th, 2003 | ||
| Permission is hereby granted, free of charge, to any person or organization | ||
| obtaining a copy of the software and accompanying documentation covered by this | ||
| license (the "Software") to use, reproduce, display, distribute, execute, and | ||
| transmit the Software, and to prepare derivative works of the Software, and to | ||
| permit third-parties to whom the Software is furnished to do so, all subject to | ||
| the following: | ||
| The copyright notices in the Software and this entire statement, including the | ||
| above license grant, this restriction and the following disclaimer, must be | ||
| included in all copies of the Software, in whole or in part, and all derivative | ||
| works of the Software, unless such copies or derivative works are solely in the | ||
| form of machine-executable object code generated by a source language processor. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
| FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
| COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES | ||
| OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF | ||
| OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| DEPENDENCIES | ||
| The library links against the following external libraries, which have their own | ||
| licenses: | ||
| * OpenBLAS <https://raw.githubusercontent.com/xianyi/OpenBLAS/ | ||
| def146efed8d5908ea04e22668feeab7099599a0/LICENSE> | ||
| Copyright (c) 2011-2014, The OpenBLAS Project | ||
| All rights reserved. | ||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions are | ||
| met: | ||
| 1. Redistributions of source code must retain the above copyright | ||
| notice, this list of conditions and the following disclaimer. | ||
| 2. Redistributions in binary form must reproduce the above copyright | ||
| notice, this list of conditions and the following disclaimer in | ||
| the documentation and/or other materials provided with the | ||
| distribution. | ||
| 3. Neither the name of the OpenBLAS project nor the names of | ||
| its contributors may be used to endorse or promote products | ||
| derived from this software without specific prior written | ||
| permission. | ||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
| LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
| GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF | ||
| THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| * Electron <https://raw.githubusercontent.com/electron/electron/ | ||
| c4cfb3e7110266b9d7ad80e1ae097c4db564501c/LICENSE> | ||
| Copyright (c) 2013-2017 GitHub Inc. | ||
| Permission is hereby granted, free of charge, to any person obtaining | ||
| a copy of this software and associated documentation files (the | ||
| "Software"), to deal in the Software without restriction, including | ||
| without limitation the rights to use, copy, modify, merge, publish, | ||
| distribute, sublicense, and/or sell copies of the Software, and to | ||
| permit persons to whom the Software is furnished to do so, subject to | ||
| the following conditions: | ||
| The above copyright notice and this permission notice shall be | ||
| included in all copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| * Boost <http://www.boost.org/LICENSE_1_0.txt> | ||
| Boost Software License - Version 1.0 - August 17th, 2003 | ||
| Permission is hereby granted, free of charge, to any person or organization | ||
| obtaining a copy of the software and accompanying documentation covered by | ||
| this license (the "Software") to use, reproduce, display, distribute, | ||
| execute, and transmit the Software, and to prepare derivative works of the | ||
| Software, and to permit third-parties to whom the Software is furnished to | ||
| do so, all subject to the following: | ||
| The copyright notices in the Software and this entire statement, including | ||
| the above license grant, this restriction and the following disclaimer, | ||
| must be included in all copies of the Software, in whole or in part, and | ||
| all derivative works of the Software, unless such copies or derivative | ||
| works are solely in the form of machine-executable object code generated by | ||
| a source language processor. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||
| SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||
| FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||
| ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| DEALINGS IN THE SOFTWARE. | ||
| * Cephes <http://www.netlib.org/cephes/readme> | ||
| Copyright (c) 1984-2000 Stephen L. Moshier | ||
| Some software in this archive may be from the book _Methods and Programs for | ||
| Mathematical Functions_ (Prentice-Hall or Simon & Schuster International, 1989) | ||
| or from the Cephes Mathematical Library, a commercial product. In either event, | ||
| it is copyrighted by the author. What you see here may be used freely but it | ||
| comes with no support or guarantee. | ||
| Stephen L. Moshier | ||
| moshier@na-net.ornl.gov | ||
| ATTRIBUTION | ||
| The library contains implementations from the following external libraries, | ||
| which have their own licenses: | ||
| * FreeBSD <https://svnweb.freebsd.org/> | ||
| Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved. | ||
| Developed at SunPro, a Sun Microsystems, Inc. business. | ||
| Permission to use, copy, modify, and distribute this | ||
| software is freely granted, provided that this notice | ||
| is preserved. | ||
| * FDLIBM <http://www.netlib.org/fdlibm/> | ||
| Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved. | ||
| Developed at SunPro, a Sun Microsystems, Inc. business. | ||
| Permission to use, copy, modify, and distribute this | ||
| software is freely granted, provided that this notice | ||
| is preserved. | ||
| * Go <https://raw.githubusercontent.com/golang/go/master/LICENSE> | ||
| Copyright (c) 2009 The Go Authors. All rights reserved. | ||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions are | ||
| met: | ||
| * Redistributions of source code must retain the above copyright | ||
| notice, this list of conditions and the following disclaimer. | ||
| * Redistributions in binary form must reproduce the above | ||
| copyright notice, this list of conditions and the following disclaimer | ||
| in the documentation and/or other materials provided with the | ||
| distribution. | ||
| * Neither the name of Google Inc. nor the names of its | ||
| contributors may be used to endorse or promote products derived from | ||
| this software without specific prior written permission. | ||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| * SLATEC Common Mathematical Library <http://www.netlib.no/netlib/slatec/> | ||
| Public domain. | ||
| * ESLint <https://raw.githubusercontent.com/eslint/eslint/master/LICENSE> | ||
| Copyright JS Foundation and other contributors, https://js.foundation | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. | ||
| * StatsFuns.jl <https://raw.githubusercontent.com/JuliaStats/StatsFuns.jl/ | ||
| e66dd973650c375bc1739c820e5b96bb5bd000a8/LICENSE.md> | ||
| Copyright (c) 2015: Dahua Lin. | ||
| Permission is hereby granted, free of charge, to any person obtaining | ||
| a copy of this software and associated documentation files (the | ||
| "Software"), to deal in the Software without restriction, including | ||
| without limitation the rights to use, copy, modify, merge, publish, | ||
| distribute, sublicense, and/or sell copies of the Software, and to | ||
| permit persons to whom the Software is furnished to do so, subject to | ||
| the following conditions: | ||
| The above copyright notice and this permission notice shall be | ||
| included in all copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| * SpecialFunctions.jl <https://raw.githubusercontent.com/JuliaMath/ | ||
| SpecialFunctions.jl/02a173fbe24a61c4b392aec17a9764ac5727feb1/LICENSE> | ||
| The MIT License (MIT) | ||
| Copyright (c) 2017 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and others: | ||
| https://github.com/JuliaMath/SpecialFunctions.jl/graphs/contributors | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. | ||
| * MT19937 <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/ | ||
| mt19937ar.c> | ||
| Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, | ||
| All rights reserved. | ||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions | ||
| are met: | ||
| 1. Redistributions of source code must retain the above copyright | ||
| notice, this list of conditions and the following disclaimer. | ||
| 2. Redistributions in binary form must reproduce the above copyright | ||
| notice, this list of conditions and the following disclaimer in the | ||
| documentation and/or other materials provided with the distribution. | ||
| 3. The names of its contributors may not be used to endorse or promote | ||
| products derived from this software without specific prior written | ||
| permission. | ||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+1
-1
@@ -1,1 +0,1 @@ | ||
| Copyright (c) 2016-2022 The Stdlib Authors. | ||
| Copyright (c) 2016-2023 The Stdlib Authors. |
+18
-18
| { | ||
| "name": "@stdlib/array-buffer", | ||
| "version": "0.0.6", | ||
| "version": "0.1.0", | ||
| "description": "ArrayBuffer.", | ||
@@ -40,22 +40,22 @@ "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@stdlib/assert-has-arraybuffer-support": "^0.0.x" | ||
| "@stdlib/assert-has-arraybuffer-support": "^0.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@stdlib/array-float64": "^0.0.x", | ||
| "@stdlib/array-uint8": "^0.0.x", | ||
| "@stdlib/assert-has-own-property": "^0.0.x", | ||
| "@stdlib/assert-has-property": "^0.0.x", | ||
| "@stdlib/assert-instance-of": "^0.0.x", | ||
| "@stdlib/assert-is-arraybuffer": "^0.0.x", | ||
| "@stdlib/assert-is-function": "^0.0.x", | ||
| "@stdlib/bench": "^0.0.x", | ||
| "@stdlib/constants-float64-max-safe-integer": "^0.0.x", | ||
| "@stdlib/math-base-special-pow": "^0.0.x", | ||
| "@stdlib/number-uint8-base-to-binary-string": "^0.0.x", | ||
| "@stdlib/process-node-version": "^0.0.x", | ||
| "@stdlib/random-base-randu": "^0.0.x", | ||
| "@stdlib/array-float64": "^0.1.0", | ||
| "@stdlib/array-uint8": "^0.1.0", | ||
| "@stdlib/assert-has-own-property": "^0.1.0", | ||
| "@stdlib/assert-has-property": "^0.1.0", | ||
| "@stdlib/assert-instance-of": "^0.1.0", | ||
| "@stdlib/assert-is-arraybuffer": "^0.1.0", | ||
| "@stdlib/assert-is-function": "^0.1.0", | ||
| "@stdlib/bench": "^0.1.0", | ||
| "@stdlib/constants-float64-max-safe-integer": "^0.1.0", | ||
| "@stdlib/math-base-special-pow": "^0.1.0", | ||
| "@stdlib/number-uint8-base-to-binary-string": "^0.1.0", | ||
| "@stdlib/process-node-version": "^0.1.0", | ||
| "@stdlib/random-base-randu": "^0.0.8", | ||
| "proxyquire": "^2.0.0", | ||
| "tape": "git+https://github.com/kgryte/tape.git#fix/globby", | ||
| "istanbul": "^0.4.1", | ||
| "tap-spec": "5.x.x" | ||
| "tap-min": "git+https://github.com/Planeshifter/tap-min.git" | ||
| }, | ||
@@ -93,5 +93,5 @@ "engines": { | ||
| "funding": { | ||
| "type": "patreon", | ||
| "url": "https://www.patreon.com/athan" | ||
| "type": "opencollective", | ||
| "url": "https://opencollective.com/stdlib" | ||
| } | ||
| } |
+33
-21
@@ -21,2 +21,13 @@ <!-- | ||
| <details> | ||
| <summary> | ||
| About stdlib... | ||
| </summary> | ||
| <p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p> | ||
| <p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p> | ||
| <p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p> | ||
| <p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p> | ||
| </details> | ||
| # ArrayBuffer | ||
@@ -248,13 +259,13 @@ | ||
| - <span class="package-name">[`@stdlib/buffer/ctor`][@stdlib/buffer/ctor]</span><span class="delimiter">: </span><span class="description">Buffer.</span> | ||
| - <span class="package-name">[`@stdlib/array/float32`][@stdlib/array/float32]</span><span class="delimiter">: </span><span class="description">Float32Array.</span> | ||
| - <span class="package-name">[`@stdlib/array/float64`][@stdlib/array/float64]</span><span class="delimiter">: </span><span class="description">Float64Array.</span> | ||
| - <span class="package-name">[`@stdlib/array/int16`][@stdlib/array/int16]</span><span class="delimiter">: </span><span class="description">Int16Array.</span> | ||
| - <span class="package-name">[`@stdlib/array/int32`][@stdlib/array/int32]</span><span class="delimiter">: </span><span class="description">Int32Array.</span> | ||
| - <span class="package-name">[`@stdlib/array/int8`][@stdlib/array/int8]</span><span class="delimiter">: </span><span class="description">Int8Array.</span> | ||
| - <span class="package-name">[`@stdlib/array/shared-buffer`][@stdlib/array/shared-buffer]</span><span class="delimiter">: </span><span class="description">SharedArrayBuffer.</span> | ||
| - <span class="package-name">[`@stdlib/array/uint16`][@stdlib/array/uint16]</span><span class="delimiter">: </span><span class="description">Uint16Array.</span> | ||
| - <span class="package-name">[`@stdlib/array/uint32`][@stdlib/array/uint32]</span><span class="delimiter">: </span><span class="description">Uint32Array.</span> | ||
| - <span class="package-name">[`@stdlib/array/uint8`][@stdlib/array/uint8]</span><span class="delimiter">: </span><span class="description">Uint8Array.</span> | ||
| - <span class="package-name">[`@stdlib/array/uint8c`][@stdlib/array/uint8c]</span><span class="delimiter">: </span><span class="description">Uint8ClampedArray.</span> | ||
| - <span class="package-name">[`@stdlib/buffer-ctor`][@stdlib/buffer/ctor]</span><span class="delimiter">: </span><span class="description">Buffer.</span> | ||
| - <span class="package-name">[`@stdlib/array-float32`][@stdlib/array/float32]</span><span class="delimiter">: </span><span class="description">Float32Array.</span> | ||
| - <span class="package-name">[`@stdlib/array-float64`][@stdlib/array/float64]</span><span class="delimiter">: </span><span class="description">Float64Array.</span> | ||
| - <span class="package-name">[`@stdlib/array-int16`][@stdlib/array/int16]</span><span class="delimiter">: </span><span class="description">Int16Array.</span> | ||
| - <span class="package-name">[`@stdlib/array-int32`][@stdlib/array/int32]</span><span class="delimiter">: </span><span class="description">Int32Array.</span> | ||
| - <span class="package-name">[`@stdlib/array-int8`][@stdlib/array/int8]</span><span class="delimiter">: </span><span class="description">Int8Array.</span> | ||
| - <span class="package-name">[`@stdlib/array-shared-buffer`][@stdlib/array/shared-buffer]</span><span class="delimiter">: </span><span class="description">SharedArrayBuffer.</span> | ||
| - <span class="package-name">[`@stdlib/array-uint16`][@stdlib/array/uint16]</span><span class="delimiter">: </span><span class="description">Uint16Array.</span> | ||
| - <span class="package-name">[`@stdlib/array-uint32`][@stdlib/array/uint32]</span><span class="delimiter">: </span><span class="description">Uint32Array.</span> | ||
| - <span class="package-name">[`@stdlib/array-uint8`][@stdlib/array/uint8]</span><span class="delimiter">: </span><span class="description">Uint8Array.</span> | ||
| - <span class="package-name">[`@stdlib/array-uint8c`][@stdlib/array/uint8c]</span><span class="delimiter">: </span><span class="description">Uint8ClampedArray.</span> | ||
@@ -291,3 +302,3 @@ </section> | ||
| Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. | ||
| Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. | ||
@@ -305,4 +316,4 @@ </section> | ||
| [test-image]: https://github.com/stdlib-js/array-buffer/actions/workflows/test.yml/badge.svg | ||
| [test-url]: https://github.com/stdlib-js/array-buffer/actions/workflows/test.yml | ||
| [test-image]: https://github.com/stdlib-js/array-buffer/actions/workflows/test.yml/badge.svg?branch=v0.1.0 | ||
| [test-url]: https://github.com/stdlib-js/array-buffer/actions/workflows/test.yml?query=branch:v0.1.0 | ||
@@ -319,2 +330,9 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/array-buffer/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 | ||
| [stdlib]: https://github.com/stdlib-js/stdlib | ||
| [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors | ||
| [umd]: https://github.com/umdjs/umd | ||
@@ -326,10 +344,4 @@ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules | ||
| [esm-url]: https://github.com/stdlib-js/array-buffer/tree/esm | ||
| [branches-url]: https://github.com/stdlib-js/array-buffer/blob/main/branches.md | ||
| [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg | ||
| [chat-url]: https://gitter.im/stdlib-js/stdlib/ | ||
| [stdlib]: https://github.com/stdlib-js/stdlib | ||
| [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors | ||
| [stdlib-license]: https://raw.githubusercontent.com/stdlib-js/array-buffer/main/LICENSE | ||
@@ -336,0 +348,0 @@ |
| {{alias}}( size ) | ||
| Returns an array buffer having a specified number of bytes. | ||
| Buffer contents are initialized to 0. | ||
| Parameters | ||
| ---------- | ||
| size: integer | ||
| Number of bytes. | ||
| Returns | ||
| ------- | ||
| out: ArrayBuffer | ||
| An array buffer. | ||
| Examples | ||
| -------- | ||
| > var buf = new {{alias}}( 5 ) | ||
| <ArrayBuffer> | ||
| {{alias}}.length | ||
| Number of input arguments the constructor accepts. | ||
| Examples | ||
| -------- | ||
| > {{alias}}.length | ||
| 1 | ||
| {{alias}}.isView( arr ) | ||
| Returns a boolean indicating if provided an array buffer view. | ||
| Parameters | ||
| ---------- | ||
| arr: any | ||
| Value to test. | ||
| Returns | ||
| ------- | ||
| bool: boolean | ||
| Boolean indicating if an input argument is a buffer view. | ||
| Examples | ||
| -------- | ||
| > var arr = new {{alias:@stdlib/array/float64}}( 10 ); | ||
| > {{alias}}.isView( arr ) | ||
| true | ||
| {{alias}}.prototype.byteLength | ||
| Read-only property which returns the length (in bytes) of the array buffer. | ||
| Examples | ||
| -------- | ||
| > var buf = new {{alias}}( 5 ); | ||
| > buf.byteLength | ||
| 5 | ||
| {{alias}}.prototype.slice( [start[, end]] ) | ||
| Copies the bytes of an array buffer to a new array buffer. | ||
| Parameters | ||
| ---------- | ||
| start: integer (optional) | ||
| Index at which to start copying buffer contents (inclusive). If | ||
| negative, the index is relative to the end of the buffer. | ||
| end: integer (optional) | ||
| Index at which to stop copying buffer contents (exclusive). If negative, | ||
| the index is relative to the end of the buffer. | ||
| Returns | ||
| ------- | ||
| out: ArrayBuffer | ||
| A new array buffer whose contents have been copied from the calling | ||
| array buffer. | ||
| Examples | ||
| -------- | ||
| > var b1 = new {{alias}}( 10 ); | ||
| > var b2 = b1.slice( 2, 6 ); | ||
| > var bool = ( b1 === b2 ) | ||
| false | ||
| > b2.byteLength | ||
| 4 | ||
| See Also | ||
| -------- | ||
| /* | ||
| * @license Apache-2.0 | ||
| * | ||
| * Copyright (c) 2021 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. | ||
| */ | ||
| // tslint:disable: no-construct | ||
| // tslint:disable: no-unused-expression | ||
| import ArrayBuffer = require( './index' ); | ||
| // TESTS // | ||
| // The function returns a data view instance... | ||
| { | ||
| new ArrayBuffer( 5 ); // $ExpectType ArrayBuffer | ||
| } | ||
| // The constructor function has to be invoked with `new`... | ||
| { | ||
| ArrayBuffer( 5 ); // $ExpectError | ||
| } |
| /** | ||
| * @license Apache-2.0 | ||
| * | ||
| * Copyright (c) 2018 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 // | ||
| var ctor = ( typeof ArrayBuffer === 'function' ) ? ArrayBuffer : void 0; // eslint-disable-line stdlib/require-globals | ||
| // EXPORTS // | ||
| module.exports = ctor; |
Mixed license
LicensePackage contains multiple licenses.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
12
20%0
-100%374
3.31%33750
-22.65%139
-4.79%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed