From a2c3fab623203689771a4a18164f222c55f07cbd Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Apr 2022 04:33:19 +0000 Subject: [PATCH 001/183] Auto-generated commit 6cd5bbba0a00c043b32995e424cda17053e9c636 --- CONTRIBUTORS | 28 + LICENSE | 481 +++++++++ NOTICE | 1 + README.md | 214 ++++ index.d.ts | 443 ++++++++ index.mjs | 4 + index.mjs.map | 1 + package.json | 45 + stats.html | 2689 +++++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 3906 insertions(+) create mode 100644 CONTRIBUTORS create mode 100644 LICENSE create mode 100644 NOTICE create mode 100644 README.md create mode 100644 index.d.ts create mode 100644 index.mjs create mode 100644 index.mjs.map create mode 100644 package.json create mode 100644 stats.html diff --git a/CONTRIBUTORS b/CONTRIBUTORS new file mode 100644 index 0000000..e5c896d --- /dev/null +++ b/CONTRIBUTORS @@ -0,0 +1,28 @@ +# This file is generated by tools/scripts/update_contributors. +# +# Contributors listed in alphabetical order. + +Ali Salesi +Athan Reines +Brendan Graetz +Bruno Fenzl +Christopher Dambamuromo +Dominik Moritz +Frank Kovacs +James +Jithin KS +Joey Reed +Joris Labie +Justin Dennison +Marcus +Matt Cochrane +Milan Raj +Momtchil Momtchev +Ognjen Jevremović +Philipp Burckhardt +Ricky Reusser +Ryan Seal +Seyyed Parsa Neshaei +Shraddheya Shendre +dorrin-sot <59933477+dorrin-sot@users.noreply.github.com> +rei2hu diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fcc9934 --- /dev/null +++ b/LICENSE @@ -0,0 +1,481 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + 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 + +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 + +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 + +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 + +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 + +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 + +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 + +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 + +Public domain. + + +* ESLint + +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 + +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 + +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 + +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. diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..10e6ba1 --- /dev/null +++ b/NOTICE @@ -0,0 +1 @@ +Copyright (c) 2016-2022 The Stdlib Authors. diff --git a/README.md b/README.md new file mode 100644 index 0000000..32f8480 --- /dev/null +++ b/README.md @@ -0,0 +1,214 @@ + + +# Assert + +[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] + +> Base ndarray assertion utilities. + + + +
+ +## Usage + +```javascript +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@esm/index.mjs'; +``` + +#### ns + +Base ndarray assertion utilities. + +```javascript +var o = ns; +// returns {...} +``` + + + +
+ +- [`isAllowedDataTypeCast( from, to, casting )`][@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: determine whether an ndarray data type can be cast to another ndarray data type according to a specified casting mode. +- [`isBufferLengthCompatibleShape( len, shape )`][@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: determine if a buffer length is compatible with an array shape. +- [`isBufferLengthCompatible( len, shape, strides, offset )`][@stdlib/ndarray/base/assert/is-buffer-length-compatible]: determine if a buffer length is compatible with ndarray meta data. +- [`isCastingMode( value )`][@stdlib/ndarray/base/assert/is-casting-mode]: test if an input value is a supported ndarray casting mode. +- [`isColumnMajorContiguous( shape, strides, offset )`][@stdlib/ndarray/base/assert/is-column-major-contiguous]: determine if an array is column-major contiguous. +- [`isColumnMajor( strides )`][@stdlib/ndarray/base/assert/is-column-major]: given a stride array, determine whether an array is column-major. +- [`isContiguous( shape, strides, offset )`][@stdlib/ndarray/base/assert/is-contiguous]: determine if an array is contiguous. +- [`isDataType( value )`][@stdlib/ndarray/base/assert/is-data-type]: test if an input value is a supported ndarray data type. +- [`isIndexMode( value )`][@stdlib/ndarray/base/assert/is-index-mode]: test if an input value is a supported ndarray index mode. +- [`isOrder( value )`][@stdlib/ndarray/base/assert/is-order]: test if an input value is an ndarray order. +- [`isRowMajorContiguous( shape, strides, offset )`][@stdlib/ndarray/base/assert/is-row-major-contiguous]: determine if an array is row-major contiguous. +- [`isRowMajor( strides )`][@stdlib/ndarray/base/assert/is-row-major]: given a stride array, determine whether an array is row-major. +- [`isSafeDataTypeCast( from, to )`][@stdlib/ndarray/base/assert/is-safe-data-type-cast]: determine whether an ndarray data type can be safely cast to another ndarray data type. +- [`isSameKindDataTypeCast( from, to )`][@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: determine whether an ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. +- [`isSingleSegmentCompatible( shape, strides, offset )`][@stdlib/ndarray/base/assert/is-single-segment-compatible]: determine if an array is compatible with a single memory segment. + +
+ + + +
+ + + +
+ +## Examples + + + + + +```html + + + + + + +``` + +
+ + + + + + + + + + + + +
+ +* * * + +## Notice + +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. + +For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. + +#### Community + +[![Chat][chat-image]][chat-url] + +--- + +## License + +See [LICENSE][stdlib-license]. + + +## Copyright + +Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. + +
+ + + + + + + + diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..aa44e7c --- /dev/null +++ b/index.d.ts @@ -0,0 +1,443 @@ +/* +* @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. +*/ + +// TypeScript Version: 2.0 + +/* tslint:disable:max-line-length */ +/* tslint:disable:max-file-line-count */ + +import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); +import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); +import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); +import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); +import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); +import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); +import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); +import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); +import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); +import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); +import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); +import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); +import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); +import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); +import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); +import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); + +/** +* Interface describing the `assert` namespace. +*/ +interface Namespace { + /** + * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. + * + * @param from - ndarray data type + * @param to - ndarray data type + * @param casting - ndarray casting mode + * @returns boolean indicating if a data type can be cast to another data type + * + * @example + * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); + * // returns true + * + * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); + * // returns false + */ + isAllowedDataTypeCast: typeof isAllowedDataTypeCast; + + /** + * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. + * + * @param len - buffer length + * @param shape - array shape + * @param strides - stride array + * @param offset - index offset + * @returns boolean indicating if a buffer length is compatible + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ 2, 1 ]; + * var offset = 0; + * + * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); + * // returns true + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ 2, 1 ]; + * var offset = 2; + * + * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); + * // returns false + */ + isBufferLengthCompatible: typeof isBufferLengthCompatible; + + /** + * Returns a boolean indicating if a buffer length is compatible with a provided shape array. + * + * @param len - buffer length + * @param shape - array shape + * @returns boolean indicating if a buffer length is compatible with a provided shape array + * + * @example + * var shape = [ 2, 2 ]; + * + * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); + * // returns true + * + * @example + * var shape = [ 2, 2 ]; + * + * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); + * // returns false + */ + isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; + + /** + * Tests whether an input value is a supported ndarray casting mode. + * + * @param v - value to test + * @returns boolean indicating whether an input value is a supported ndarray casting mode + * + * @example + * var bool = ns.isCastingMode( 'none' ); + * // returns true + * + * bool = ns.isCastingMode( 'equiv' ); + * // returns true + * + * bool = ns.isCastingMode( 'safe' ); + * // returns true + * + * bool = ns.isCastingMode( 'same-kind' ); + * // returns true + * + * bool = ns.isCastingMode( 'unsafe' ); + * // returns true + * + * bool = ns.isCastingMode( 'foo' ); + * // returns false + */ + isCastingMode: typeof isCastingMode; + + /** + * Returns a boolean indicating if an array is column-major based on a provided stride array. + * + * @param strides - integer stride array + * @returns boolean indicating if an array is column-major + * + * @example + * var bool = ns.isColumnMajor( [ 1, 2 ] ); + * // returns true + * + * bool = ns.isColumnMajor( [ 2, 1 ] ); + * // returns false + */ + isColumnMajor: typeof isColumnMajor; + + /** + * Returns a boolean indicating if an array is column-major contiguous. + * + * @param shape - array shape + * @param strides - stride array + * @param offset - index offset + * @returns boolean indicating if an array is column-major contiguous + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ 1, 2 ]; + * var offset = 0; + * + * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); + * // returns true + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ 1, -2 ]; + * var offset = 2; + * + * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); + * // returns false + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ 2, 2 ]; + * var offset = 0; + * + * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); + * // returns false + */ + isColumnMajorContiguous: typeof isColumnMajorContiguous; + + /** + * Returns a boolean indicating if an array is contiguous. + * + * @param shape - array shape + * @param strides - stride array + * @param offset - index offset + * @returns boolean indicating if an array is contiguous + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ 2, 1 ]; + * var offset = 0; + * + * var bool = ns.isContiguous( shape, strides, offset ); + * // returns true + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ -2, 1 ]; + * var offset = 2; + * + * var bool = ns.isContiguous( shape, strides, offset ); + * // returns false + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ 2, 2 ]; + * var offset = 0; + * + * var bool = ns.isContiguous( shape, strides, offset ); + * // returns false + */ + isContiguous: typeof isContiguous; + + /** + * Tests whether an input value is a supported ndarray data type. + * + * @param v - value to test + * @returns boolean indicating whether an input value is a supported ndarray data type + * + * @example + * var bool = ns.isDataType( 'binary' ); + * // returns true + * + * bool = ns.isDataType( 'float32' ); + * // returns true + * + * bool = ns.isDataType( 'float64' ); + * // returns true + * + * bool = ns.isDataType( 'generic' ); + * // returns true + * + * bool = ns.isDataType( 'int16' ); + * // returns true + * + * bool = ns.isDataType( 'int32' ); + * // returns true + * + * bool = ns.isDataType( 'int8' ); + * // returns true + * + * bool = ns.isDataType( 'uint16' ); + * // returns true + * + * bool = ns.isDataType( 'uint32' ); + * // returns true + * + * bool = ns.isDataType( 'uint8' ); + * // returns true + * + * bool = ns.isDataType( 'uint8c' ); + * // returns true + * + * bool = ns.isDataType( 'foo' ); + * // returns false + */ + isDataType: typeof isDataType; + + /** + * Tests whether an input value is a supported ndarray index mode. + * + * @param v - value to test + * @returns boolean indicating whether an input value is a supported ndarray index mode + * + * @example + * var bool = ns.isIndexMode( 'wrap' ); + * // returns true + * + * bool = ns.isIndexMode( 'clamp' ); + * // returns true + * + * bool = ns.isIndexMode( 'throw' ); + * // returns true + * + * bool = ns.isIndexMode( 'foo' ); + * // returns false + */ + isIndexMode: typeof isIndexMode; + + /** + * Tests whether an input value is an ndarray order. + * + * @param v - value to test + * @returns boolean indicating whether an input value is an ndarray order + * + * @example + * var bool = ns.isOrder( 'row-major' ); + * // returns true + * + * bool = ns.isOrder( 'column-major' ); + * // returns true + * + * bool = ns.isOrder( 'foo' ); + * // returns false + */ + isOrder: typeof isOrder; + + /** + * Tests whether an ndarray is read-only. + * + * @param arr - input ndarray + * @returns boolean indicating whether an ndarray is read-only + * + * @example + * var array = require( `@stdlib/ndarray/array` ); + * + * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { + * 'readonly': true + * }); + * var bool = ns.isReadOnly( x ); + * // returns true + * + * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { + * 'readonly': false + * }); + * bool = ns.isReadOnly( x ); + * // returns false + */ + isReadOnly: typeof isReadOnly; + + /** + * Returns a boolean indicating if an array is row-major based on a provided stride array. + * + * @param strides - integer stride array + * @returns boolean indicating if an array is row-major + * + * @example + * var bool = ns.isRowMajor( [ 2, 1 ] ); + * // returns true + * + * bool = ns.isRowMajor( [ 1, 2 ] ); + * // returns false + */ + isRowMajor: typeof isRowMajor; + + /** + * Returns a boolean indicating if an array is row-major contiguous. + * + * @param shape - array shape + * @param strides - stride array + * @param offset - index offset + * @returns boolean indicating if an array is row-major contiguous + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ 2, 1 ]; + * var offset = 0; + * + * var bool = ns.isRowMajorContiguous( shape, strides, offset ); + * // returns true + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ -2, 1 ]; + * var offset = 2; + * + * var bool = ns.isRowMajorContiguous( shape, strides, offset ); + * // returns false + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ 2, 2 ]; + * var offset = 0; + * + * var bool = ns.isRowMajorContiguous( shape, strides, offset ); + * // returns false + */ + isRowMajorContiguous: typeof isRowMajorContiguous; + + /** + * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. + * + * @param from - ndarray data type + * @param to - ndarray data type + * @returns boolean indicating if a data type can be safely cast to another data type + * + * @example + * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); + * // returns true + * + * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); + * // returns false + */ + isSafeDataTypeCast: typeof isSafeDataTypeCast; + + /** + * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. + * + * @param from - ndarray data type + * @param to - ndarray data type + * @returns boolean indicating if a data type can be cast to another data type + * + * @example + * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); + * // returns true + * + * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); + * // returns false + */ + isSameKindDataTypeCast: typeof isSameKindDataTypeCast; + + /** + * Returns a boolean indicating if an array is compatible with a single memory segment. + * + * @param shape - array shape + * @param strides - stride array + * @param offset - index offset + * @returns boolean indicating if an array is compatible with a single memory segment + * + * @example + * var shape = [ 2, 2 ]; + * var strides = [ 2, 1 ]; + * var offset = 0; + * + * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); + * // returns true + * + * @example + * var shape = [ 10 ]; + * var strides = [ 3 ]; + * var offset = 0; + * + * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); + * // returns false + */ + isSingleSegmentCompatible: typeof isSingleSegmentCompatible; +} + +/** +* Base ndarray assertion utilities. +*/ +declare var ns: Namespace; + + +// EXPORTS // + +export = ns; diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..e872172 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u=s,c={};u(c,"isAllowedDataTypeCast",e),u(c,"isBufferLengthCompatible",t),u(c,"isBufferLengthCompatibleShape",a),u(c,"isCastingMode",r),u(c,"isColumnMajor",i),u(c,"isColumnMajorContiguous",d),u(c,"isContiguous",n),u(c,"isDataType",m),u(c,"isIndexMode",o),u(c,"isOrder",l),u(c,"isReadOnly",j),u(c,"isRowMajor",p),u(c,"isRowMajorContiguous",b),u(c,"isSafeDataTypeCast",h),u(c,"isSameKindDataTypeCast",f),u(c,"isSingleSegmentCompatible",g);var x=c;export{x as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..2a2dc87 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"],"names":["setReadOnly","require$$0","ns","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","require$$15","require$$16","lib"],"mappings":";;63HA0BA,IAAAA,EAAAC,EAUAC,EAAA,GASAF,EAAAE,EAAA,wBAAAC,GASAH,EAAAE,EAAA,2BAAAE,GASAJ,EAAAE,EAAA,gCAAAG,GASAL,EAAAE,EAAA,gBAAAI,GASAN,EAAAE,EAAA,gBAAAK,GASAP,EAAAE,EAAA,0BAAAM,GASAR,EAAAE,EAAA,eAAAO,GASAT,EAAAE,EAAA,aAAAQ,GASAV,EAAAE,EAAA,cAAAS,GASAX,EAAAE,EAAA,UAAAU,GASAZ,EAAAE,EAAA,aAAAW,GASAb,EAAAE,EAAA,aAAAY,GASAd,EAAAE,EAAA,uBAAAa,GASAf,EAAAE,EAAA,qBAAAc,GASAhB,EAAAE,EAAA,yBAAAe,GASAjB,EAAAE,EAAA,4BAAAgB,GAKA,IAAAC,EAAAjB"} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..0e4a9d4 --- /dev/null +++ b/package.json @@ -0,0 +1,45 @@ +{ + "name": "@stdlib/ndarray-base-assert", + "version": "0.0.0", + "description": "Base ndarray assertion utilities.", + "license": "Apache-2.0", + "type": "module", + "main": "./index.mjs", + "homepage": "https://stdlib.io", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/ndarray-base-assert.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "keywords": [ + "stdlib", + "stdtypes", + "types", + "data", + "structures", + "array", + "vector", + "matrix", + "ndarray", + "multidimensional", + "buffer", + "base", + "assert", + "assertion", + "is", + "valid", + "validate", + "validation", + "isvalid", + "test", + "check", + "namespace", + "ns" + ], + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/athan" + } +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..7262797 --- /dev/null +++ b/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + From 0a196dffb2e34a022de89ad95889ddbe6a65c005 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 30 Jun 2022 23:13:31 +0000 Subject: [PATCH 002/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0c7fb18..4d08cff 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From f286620083c580a2fcd189cb20f9de4c414a4ebc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Jul 2022 10:37:59 +0000 Subject: [PATCH 003/183] Remove files --- index.d.ts | 443 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3137 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index e872172..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u=s,c={};u(c,"isAllowedDataTypeCast",e),u(c,"isBufferLengthCompatible",t),u(c,"isBufferLengthCompatibleShape",a),u(c,"isCastingMode",r),u(c,"isColumnMajor",i),u(c,"isColumnMajorContiguous",d),u(c,"isContiguous",n),u(c,"isDataType",m),u(c,"isIndexMode",o),u(c,"isOrder",l),u(c,"isReadOnly",j),u(c,"isRowMajor",p),u(c,"isRowMajorContiguous",b),u(c,"isSafeDataTypeCast",h),u(c,"isSameKindDataTypeCast",f),u(c,"isSingleSegmentCompatible",g);var x=c;export{x as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 2a2dc87..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"],"names":["setReadOnly","require$$0","ns","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","require$$15","require$$16","lib"],"mappings":";;63HA0BA,IAAAA,EAAAC,EAUAC,EAAA,GASAF,EAAAE,EAAA,wBAAAC,GASAH,EAAAE,EAAA,2BAAAE,GASAJ,EAAAE,EAAA,gCAAAG,GASAL,EAAAE,EAAA,gBAAAI,GASAN,EAAAE,EAAA,gBAAAK,GASAP,EAAAE,EAAA,0BAAAM,GASAR,EAAAE,EAAA,eAAAO,GASAT,EAAAE,EAAA,aAAAQ,GASAV,EAAAE,EAAA,cAAAS,GASAX,EAAAE,EAAA,UAAAU,GASAZ,EAAAE,EAAA,aAAAW,GASAb,EAAAE,EAAA,aAAAY,GASAd,EAAAE,EAAA,uBAAAa,GASAf,EAAAE,EAAA,qBAAAc,GASAhB,EAAAE,EAAA,yBAAAe,GASAjB,EAAAE,EAAA,4BAAAgB,GAKA,IAAAC,EAAAjB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 7262797..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 96f3c749a4e3395649e20f40e84cdb5324d9635d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Jul 2022 10:39:07 +0000 Subject: [PATCH 004/183] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 33 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 681 ------ .github/workflows/publish.yml | 157 -- .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 71 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 87 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2732 insertions(+), 3301 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 7212d81..0000000 --- a/.gitattributes +++ /dev/null @@ -1,33 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 3e35b2f..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-06-30T22:21:16.712Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 29bf533..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a7a7f51..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.9.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 39b1613..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 7ca169c..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '0 8 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "::set-output name=package_name::$name" - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "::set-output name=data::$data" - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v2 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v2 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 128c22e..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,681 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the repository: - push: - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs rm -rf - - git add -A - git commit -m "Remove files" - - git merge -s recursive -X theirs origin/production --allow-unrelated-histories - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch or create new branch tag: - - name: 'Push changes to `deno` branch or create new branch tag' - run: | - SLUG=${{ github.repository }} - VERSION=$(echo ${{ github.ref }} | sed -E -n 's/refs\/tags\/?(v[0-9]+.[0-9]+.[0-9]+).*/\1/p') - if [ -z "$VERSION" ]; then - echo "Workflow job was not triggered by a new tag...." - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - else - echo "Workflow job was triggered by a new tag: $VERSION" - echo "Creating new bundle branch tag of the form $VERSION-deno" - git tag -a $VERSION-deno -m "$VERSION-deno" - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" $VERSION-deno - fi - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs rm -rf - - git add -A - git commit -m "Remove files" - - git merge -s recursive -X theirs origin/production --allow-unrelated-histories - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "::set-output name=alias::${alias}" - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,35 +184,35 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ea40c37..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import assert = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - assert; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7f3a46c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..005ceb1 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d08cff..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-spec": "5.x.x" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..9d3d213 --- /dev/null +++ b/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From c5133ca0261a131ab86acc0baee2cdaa6b32efd3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Jul 2022 18:46:22 +0000 Subject: [PATCH 005/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0c7fb18..4d08cff 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From e1a0565230f1a240a84f35aa059ebe6187ab9f84 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Jul 2022 09:21:31 +0000 Subject: [PATCH 006/183] Remove files --- index.d.ts | 443 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3137 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7f3a46c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 005ceb1..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 9d3d213..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From d4b9e395347ea682e27d4694e7dd534296e87f08 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Jul 2022 09:22:34 +0000 Subject: [PATCH 007/183] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 33 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 681 ------ .github/workflows/publish.yml | 157 -- .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 71 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 87 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2732 insertions(+), 3301 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 7212d81..0000000 --- a/.gitattributes +++ /dev/null @@ -1,33 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index c5a2643..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-07-01T01:20:40.015Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 29bf533..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a7a7f51..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.9.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 39b1613..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 7ca169c..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '0 8 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "::set-output name=package_name::$name" - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "::set-output name=data::$data" - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v2 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v2 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 128c22e..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,681 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the repository: - push: - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs rm -rf - - git add -A - git commit -m "Remove files" - - git merge -s recursive -X theirs origin/production --allow-unrelated-histories - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch or create new branch tag: - - name: 'Push changes to `deno` branch or create new branch tag' - run: | - SLUG=${{ github.repository }} - VERSION=$(echo ${{ github.ref }} | sed -E -n 's/refs\/tags\/?(v[0-9]+.[0-9]+.[0-9]+).*/\1/p') - if [ -z "$VERSION" ]; then - echo "Workflow job was not triggered by a new tag...." - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - else - echo "Workflow job was triggered by a new tag: $VERSION" - echo "Creating new bundle branch tag of the form $VERSION-deno" - git tag -a $VERSION-deno -m "$VERSION-deno" - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" $VERSION-deno - fi - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs rm -rf - - git add -A - git commit -m "Remove files" - - git merge -s recursive -X theirs origin/production --allow-unrelated-histories - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "::set-output name=alias::${alias}" - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,35 +184,35 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ea40c37..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import assert = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - assert; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7f3a46c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..005ceb1 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d08cff..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-spec": "5.x.x" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..327db8f --- /dev/null +++ b/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 37d0834b21bf28cfd66ccaf82495c76843472bb4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 4 Jul 2022 17:03:55 +0000 Subject: [PATCH 008/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0c7fb18..4d08cff 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From 229a864abdb1e43d557dbfd1699f49a3a1a17833 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 4 Jul 2022 18:32:59 +0000 Subject: [PATCH 009/183] Remove files --- index.d.ts | 443 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3137 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7f3a46c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 005ceb1..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 327db8f..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 94a0aa17a591e4f3ca0c967e5231ee175819acb9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 4 Jul 2022 18:34:15 +0000 Subject: [PATCH 010/183] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 33 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 687 ------ .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 71 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 87 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 2732 insertions(+), 3266 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 7212d81..0000000 --- a/.gitattributes +++ /dev/null @@ -1,33 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 29bf533..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a7a7f51..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.9.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 39b1613..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 7ca169c..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '0 8 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "::set-output name=package_name::$name" - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "::set-output name=data::$data" - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v2 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v2 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 6726965..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,687 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the repository: - push: - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch or create new branch tag: - - name: 'Push changes to `deno` branch or create new branch tag' - run: | - SLUG=${{ github.repository }} - VERSION=$(echo ${{ github.ref }} | sed -E -n 's/refs\/tags\/?(v[0-9]+.[0-9]+.[0-9]+).*/\1/p') - if [ -z "$VERSION" ]; then - echo "Workflow job was not triggered by a new tag...." - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - else - echo "Workflow job was triggered by a new tag: $VERSION" - echo "Creating new bundle branch tag of the form $VERSION-deno" - git tag -a $VERSION-deno -m "$VERSION-deno" - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" $VERSION-deno - fi - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "::set-output name=alias::${alias}" - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -123,7 +122,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -185,35 +184,35 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ea40c37..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import assert = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - assert; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7f3a46c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..005ceb1 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d08cff..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-spec": "5.x.x" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..c3e5766 --- /dev/null +++ b/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 7ae709aaf2ca40687d5b37e3090740252635a135 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 28 Jul 2022 13:30:41 +0000 Subject: [PATCH 011/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0c7fb18..4d08cff 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From 6857c5aa98de5fa61ea98716d7d269879c399942 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 28 Jul 2022 14:24:22 +0000 Subject: [PATCH 012/183] Remove files --- index.d.ts | 443 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3137 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7f3a46c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 005ceb1..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index c3e5766..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From bab04341aa8475a8d8613b79714da8f9be7c904a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 28 Jul 2022 14:25:53 +0000 Subject: [PATCH 013/183] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 33 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 760 ------ .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 87 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 2733 insertions(+), 3340 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 7212d81..0000000 --- a/.gitattributes +++ /dev/null @@ -1,33 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 29bf533..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a7a7f51..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.9.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 39b1613..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 7ca169c..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '0 8 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "::set-output name=package_name::$name" - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "::set-output name=data::$data" - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v2 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v2 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 5094681..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,760 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "::set-output name=alias::${alias}" - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ea40c37..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import assert = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - assert; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7f3a46c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..005ceb1 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d08cff..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-spec": "5.x.x" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..af69ef8 --- /dev/null +++ b/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 9202922533e79d3f44f82d1433899772e599ca79 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Aug 2022 04:45:04 +0000 Subject: [PATCH 014/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0c7fb18..4d08cff 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From c3efbaf873490d7a9b5bdd7cad72f3c9da45ef42 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Aug 2022 16:36:33 +0000 Subject: [PATCH 015/183] Remove files --- index.d.ts | 443 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3137 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7f3a46c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 005ceb1..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index af69ef8..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 8c46405bf7710a8fc5aa79c2ab4ced91aafdf614 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Aug 2022 16:37:45 +0000 Subject: [PATCH 016/183] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 33 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 760 ------ .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 87 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2733 insertions(+), 3341 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 7212d81..0000000 --- a/.gitattributes +++ /dev/null @@ -1,33 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 83e3880..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-08-01T01:23:53.899Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 29bf533..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a7a7f51..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.9.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 39b1613..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 7ca169c..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '0 8 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "::set-output name=package_name::$name" - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "::set-output name=data::$data" - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v2 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v2 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 5094681..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,760 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "::set-output name=alias::${alias}" - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ea40c37..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import assert = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - assert; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7f3a46c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..005ceb1 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d08cff..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-spec": "5.x.x" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..52a4cdb --- /dev/null +++ b/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From d05443a7e1d00c004aaa2277bca8c925abc41054 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Sep 2022 04:20:56 +0000 Subject: [PATCH 017/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0c7fb18..4d08cff 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From 6a26114517a33240cbd882187190b310ce5a9945 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Sep 2022 18:34:59 +0000 Subject: [PATCH 018/183] Remove files --- index.d.ts | 443 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3137 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7f3a46c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 005ceb1..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 52a4cdb..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From f4aff83b756d5cb31d05e6a85b9ceb183457acc6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Sep 2022 18:36:13 +0000 Subject: [PATCH 019/183] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 760 ------ .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 87 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2733 insertions(+), 3357 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index d9bbf98..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-09-01T01:22:15.284Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 29bf533..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a7a7f51..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.9.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 39b1613..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 7ca169c..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '0 8 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "::set-output name=package_name::$name" - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "::set-output name=data::$data" - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v2 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v2 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 5094681..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,760 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "::set-output name=alias::${alias}" - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ea40c37..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import assert = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - assert; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7f3a46c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..005ceb1 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d08cff..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-spec": "5.x.x" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..639bc68 --- /dev/null +++ b/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 70541cbc1d290f03c9a7d5aa6cdf3c2583af38f8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Oct 2022 04:29:32 +0000 Subject: [PATCH 020/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0c7fb18..4d08cff 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From f2e00e45c03f60fc85ab05b9b0a6acbee8df5607 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Oct 2022 21:32:20 +0000 Subject: [PATCH 021/183] Remove files --- index.d.ts | 443 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3137 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7f3a46c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 005ceb1..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 639bc68..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From e702607191f9b714582221b33c7064d1db075329 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Oct 2022 21:33:35 +0000 Subject: [PATCH 022/183] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 760 ------ .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 87 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 2733 insertions(+), 3357 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 2ac98d9..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-10-01T01:48:47.417Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 29bf533..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a7a7f51..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.9.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 39b1613..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 7ca169c..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '0 8 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "::set-output name=package_name::$name" - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "::set-output name=data::$data" - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v2 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v2 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 5094681..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,760 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "::set-output name=alias::${alias}" - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index ea40c37..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import assert = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - assert; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7f3a46c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..005ceb1 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d08cff..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-spec": "5.x.x" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..219939a --- /dev/null +++ b/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From f67b1a1ee7e39e2b5ac45b58d7607264671feda2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 11 Oct 2022 22:03:49 +0000 Subject: [PATCH 023/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0c7fb18..4d08cff 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From 61d33d0d87be7f2b9553f9d56b8a8d3460d0e9dd Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 11 Oct 2022 22:54:14 +0000 Subject: [PATCH 024/183] Remove files --- index.d.ts | 443 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3137 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7f3a46c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 005ceb1..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 219939a..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 9bd867843838e79c1dc06745a4fdab489de42e16 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 11 Oct 2022 22:55:16 +0000 Subject: [PATCH 025/183] Auto-generated commit --- .editorconfig | 181 -- .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 760 ------ .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 -- .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 -- .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 ---- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 -- package.json | 87 +- stats.html | 2689 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 2733 insertions(+), 3356 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 29bf533..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a7a7f51..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.9.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 39b1613..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 7ca169c..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '0 8 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "::set-output name=package_name::$name" - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "::set-output name=data::$data" - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v2 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v2 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 5094681..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,760 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "::set-output name=remote-exists::true" - else - echo "::set-output name=remote-exists::false" - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v2 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "::set-output name=alias::${alias}" - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7f3a46c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..005ceb1 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d08cff..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-spec": "5.x.x" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..aa9e876 --- /dev/null +++ b/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From e46f1aac8d76e697a0ca807876d99306744f037b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Nov 2022 04:41:58 +0000 Subject: [PATCH 026/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0c7fb18..4d08cff 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From 259fb412ea5508e1810b8cd605d0639318fbf69a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Nov 2022 16:31:14 +0000 Subject: [PATCH 027/183] Remove files --- index.d.ts | 443 -------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 2689 ------------------------------------------------- 4 files changed, 3137 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7f3a46c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 005ceb1..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,GAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index aa9e876..0000000 --- a/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 0ed620368ed60ad7ff49ce719f0b997e29b8726c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 1 Nov 2022 16:32:21 +0000 Subject: [PATCH 028/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 760 ---- .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 - .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 87 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4088 insertions(+), 3357 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index da500ef..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-11-01T01:35:21.440Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 9113bfe..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,760 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7f3a46c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..64da029 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d08cff..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-spec": "5.x.x" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..16d986c --- /dev/null +++ b/stats.html @@ -0,0 +1,4044 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From da747f24bec037254f85b7da9c0d93026f792066 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 4 Nov 2022 00:20:49 +0000 Subject: [PATCH 029/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0c7fb18..4d08cff 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From 272e71418c1d235127528d75cec3c9f881b00ffd Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 4 Nov 2022 13:51:12 +0000 Subject: [PATCH 030/183] Remove files --- index.d.ts | 443 ------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 4492 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7f3a46c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 64da029..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 16d986c..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From bb43e17593a9d72e01be632f97d895308c0cb455 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 4 Nov 2022 13:52:29 +0000 Subject: [PATCH 031/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 781 ---- .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 178 - .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 87 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4088 insertions(+), 3378 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 71fab85..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-11-03T22:20:09.613Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 37ddb4f..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,781 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7f3a46c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..64da029 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d08cff..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-spec": "5.x.x" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..b645590 --- /dev/null +++ b/stats.html @@ -0,0 +1,4044 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 52e29be7b732596dc2fa3a23696e0795a9122751 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Dec 2022 04:14:14 +0000 Subject: [PATCH 032/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 09d21eb..a86b362 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From a581834fd1a94a6dd49c6d09e8db3c0e17921481 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Dec 2022 17:58:03 +0000 Subject: [PATCH 033/183] Remove files --- index.d.ts | 443 ------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 4492 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7f3a46c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 64da029..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property' ;\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index b645590..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 080dec0302be7653352837f8619cc4c4f3d3fce5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Dec 2022 17:59:18 +0000 Subject: [PATCH 034/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 781 ---- .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 183 - .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 87 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4088 insertions(+), 3383 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 4c1b703..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2022-12-01T02:09:48.825Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 37ddb4f..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,781 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..7f3a46c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..2e5c0f8 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index a86b362..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "2.x.x" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..40ce01d --- /dev/null +++ b/stats.html @@ -0,0 +1,4044 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From f787203f97f7ad38751f718e967979b1e18fc019 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Jan 2023 03:32:27 +0000 Subject: [PATCH 035/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5b2e0a8..4c18df1 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From 006f20406843dfc43ef40ede72b1b6affe174cd6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Jan 2023 08:40:50 +0000 Subject: [PATCH 036/183] Remove files --- index.d.ts | 443 ------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 4492 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 7f3a46c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2022 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 2e5c0f8..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 40ce01d..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From e132e5078c909e65807520b3e516ae70f693851c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 1 Jan 2023 08:41:55 +0000 Subject: [PATCH 037/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 791 ---- .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 184 - .npmignore | 227 -- .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 87 +- stats.html | 4044 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 4088 insertions(+), 3394 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index fc403e0..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-01-01T01:26:59.947Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4eea88..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,791 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..fc6938c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..2e5c0f8 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4c18df1..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..51e13c5 --- /dev/null +++ b/stats.html @@ -0,0 +1,4044 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From ee6ad49f96a157f1f40c370bc10c9dd6839b6518 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Feb 2023 03:59:05 +0000 Subject: [PATCH 038/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5b2e0a8..4c18df1 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x" + "@stdlib/utils-define-read-only-property": "^0.0.x", + "@stdlib/error-tools-fmtprodmsg": "^0.0.x" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.x", @@ -122,4 +123,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} +} \ No newline at end of file From 16789b19f62e2fbacce45a7079992c89aa042fc8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Feb 2023 09:33:38 +0000 Subject: [PATCH 039/183] Remove files --- index.d.ts | 443 ------ index.mjs | 4 - index.mjs.map | 1 - stats.html | 4044 ------------------------------------------------- 4 files changed, 4492 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index fc6938c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 2e5c0f8..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 51e13c5..0000000 --- a/stats.html +++ /dev/null @@ -1,4044 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - - From 1eb688144bc5e74fe0982ac9cc175ff60b903a6b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Feb 2023 09:34:44 +0000 Subject: [PATCH 040/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 791 --- .github/workflows/publish.yml | 117 - .github/workflows/test.yml | 92 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 184 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 87 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6221 insertions(+), 3394 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 7eac678..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-02-01T01:56:32.851Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4eea88..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,791 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\"/\"@stdlib\/error-tools-fmtprodmsg\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^0.0.x'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 7ffc6b7..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..fc6938c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..2e5c0f8 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4c18df1..f9731f4 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.x", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.x", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.x", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.x", - "@stdlib/ndarray-base-assert-is-order": "^0.0.x", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.x", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.x", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.x", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.x", - "@stdlib/utils-define-read-only-property": "^0.0.x", - "@stdlib/error-tools-fmtprodmsg": "^0.0.x" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.x", - "@stdlib/bench": "^0.0.x", - "@stdlib/math-base-special-abs": "^0.0.x", - "@stdlib/math-base-special-floor": "^0.0.x", - "@stdlib/ndarray-array": "^0.0.x", - "@stdlib/ndarray-base-iteration-order": "^0.0.x", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.x", - "@stdlib/ndarray-base-numel": "^0.0.x", - "@stdlib/ndarray-base-shape2strides": "^0.0.x", - "@stdlib/ndarray-base-strides2offset": "^0.0.x", - "@stdlib/ndarray-casting-modes": "^0.0.x", - "@stdlib/ndarray-dtypes": "^0.0.x", - "@stdlib/ndarray-index-modes": "^0.0.x", - "@stdlib/ndarray-orders": "^0.0.x", - "@stdlib/ndarray-safe-casts": "^0.0.x", - "@stdlib/ndarray-same-kind-casts": "^0.0.x", - "@stdlib/random-base-discrete-uniform": "^0.0.x", - "@stdlib/random-base-randu": "^0.0.x", - "@stdlib/utils-keys": "^0.0.x", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "patreon", "url": "https://www.patreon.com/athan" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..55d3d73 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From e733b9cff01c8c7eebaf4b85b00364863b3df88a Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Mar 2023 07:53:48 +0000 Subject: [PATCH 041/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4fa2c2c..86b996e 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.9", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.9", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", - "@stdlib/utils-define-read-only-property": "^0.0.8" + "@stdlib/utils-define-read-only-property": "^0.0.8", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.8", @@ -122,4 +123,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 956da2c204b54732c28e633f5e54093b80b096cc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Mar 2023 17:19:06 +0000 Subject: [PATCH 042/183] Remove files --- index.d.ts | 443 ---- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6625 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index fc6938c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 2e5c0f8..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 55d3d73..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From ff17f1a2dc48b1ff9b815db957ce9e9e0cf70576 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Mar 2023 17:20:08 +0000 Subject: [PATCH 043/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 236 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 87 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6221 insertions(+), 3529 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 834a1e5..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-03-01T05:09:38.305Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..fc6938c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..2e5c0f8 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 86b996e..8f7b74e 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.8", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.8", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.8", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-order": "^0.0.7", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.1", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", - "@stdlib/utils-define-read-only-property": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/math-base-special-abs": "^0.0.6", - "@stdlib/math-base-special-floor": "^0.0.8", - "@stdlib/ndarray-array": "^0.0.9", - "@stdlib/ndarray-base-iteration-order": "^0.0.8", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.8", - "@stdlib/ndarray-base-numel": "^0.0.8", - "@stdlib/ndarray-base-shape2strides": "^0.0.8", - "@stdlib/ndarray-base-strides2offset": "^0.0.8", - "@stdlib/ndarray-casting-modes": "^0.0.8", - "@stdlib/ndarray-dtypes": "^0.0.9", - "@stdlib/ndarray-index-modes": "^0.0.8", - "@stdlib/ndarray-orders": "^0.0.8", - "@stdlib/ndarray-safe-casts": "^0.0.8", - "@stdlib/ndarray-same-kind-casts": "^0.0.8", - "@stdlib/random-base-discrete-uniform": "^0.0.6", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..cfa8605 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 48da7d0c26a20c4864fc7284007627bcd999cfbb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Apr 2023 08:32:50 +0000 Subject: [PATCH 044/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4fa2c2c..86b996e 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.9", "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.9", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", - "@stdlib/utils-define-read-only-property": "^0.0.8" + "@stdlib/utils-define-read-only-property": "^0.0.8", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2" }, "devDependencies": { "@stdlib/assert-is-boolean": "^0.0.8", @@ -122,4 +123,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 83ca5f0dfce8f81610d1fcb9c8a8d0c83545e5c2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Apr 2023 16:24:12 +0000 Subject: [PATCH 045/183] Remove files --- index.d.ts | 443 ---- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6625 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index fc6938c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 2e5c0f8..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index cfa8605..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 17b9145748a2db4129c92ef9626edd5186efe6b5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 1 Apr 2023 16:25:30 +0000 Subject: [PATCH 046/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 186 - package.json | 87 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 34 files changed, 6221 insertions(+), 3535 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 6cbd2bb..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-04-01T05:57:36.121Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..fc6938c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..2e5c0f8 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 2c48f1b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,186 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 86b996e..8f7b74e 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,65 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.8", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.8", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.8", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-order": "^0.0.7", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.1", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", - "@stdlib/utils-define-read-only-property": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2" - }, - "devDependencies": { - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/math-base-special-abs": "^0.0.6", - "@stdlib/math-base-special-floor": "^0.0.8", - "@stdlib/ndarray-array": "^0.0.9", - "@stdlib/ndarray-base-iteration-order": "^0.0.8", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.8", - "@stdlib/ndarray-base-numel": "^0.0.8", - "@stdlib/ndarray-base-shape2strides": "^0.0.8", - "@stdlib/ndarray-base-strides2offset": "^0.0.8", - "@stdlib/ndarray-casting-modes": "^0.0.8", - "@stdlib/ndarray-dtypes": "^0.0.9", - "@stdlib/ndarray-index-modes": "^0.0.8", - "@stdlib/ndarray-orders": "^0.0.8", - "@stdlib/ndarray-safe-casts": "^0.0.8", - "@stdlib/ndarray-same-kind-casts": "^0.0.8", - "@stdlib/random-base-discrete-uniform": "^0.0.6", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -123,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..7df3d83 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 5c4a9f6d2cd45670e06dd0ee05a34fe1e4732f10 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 2 Apr 2023 01:08:44 +0000 Subject: [PATCH 047/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f38aa88..3b0e5b2 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type#main", - "@stdlib/utils-define-read-only-property": "^0.0.8" + "@stdlib/utils-define-read-only-property": "^0.0.8", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", @@ -130,4 +131,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From faa4b4255e2f09df179d6b9ba1e515855754ab41 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 2 Apr 2023 01:12:14 +0000 Subject: [PATCH 048/183] Remove files --- index.d.ts | 443 ---- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6625 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index fc6938c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";var u={};s(u,"isAllowedDataTypeCast",e),s(u,"isBufferLengthCompatible",t),s(u,"isBufferLengthCompatibleShape",a),s(u,"isCastingMode",r),s(u,"isColumnMajor",i),s(u,"isColumnMajorContiguous",d),s(u,"isContiguous",n),s(u,"isDataType",m),s(u,"isIndexMode",o),s(u,"isOrder",l),s(u,"isReadOnly",j),s(u,"isRowMajor",p),s(u,"isRowMajorContiguous",b),s(u,"isSafeDataTypeCast",h),s(u,"isSameKindDataTypeCast",f),s(u,"isSingleSegmentCompatible",g);export{u as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 2e5c0f8..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isContiguous","isDataType","isIndexMode","isOrder","isReadOnly","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSingleSegmentCompatible"],"mappings":";;63HAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,eAAAQ,GAUAP,EAAAD,EAAA,aAAAS,GAUAR,EAAAD,EAAA,cAAAU,GAUAT,EAAAD,EAAA,UAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,uBAAAc,GAUAb,EAAAD,EAAA,qBAAAe,GAUAd,EAAAD,EAAA,yBAAAgB,GAUAf,EAAAD,EAAA,4BAAAiB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 7df3d83..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From f13735520cba2f85833113ca1f53f7b7170c3214 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 2 Apr 2023 01:13:35 +0000 Subject: [PATCH 049/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 249 - package.json | 95 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 6221 insertions(+), 3605 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..3c86497 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integral-data-type@esm/index.mjs";export{default as isIntegralDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integral-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var T={};s(T,"isAllowedDataTypeCast",e),s(T,"isBufferLengthCompatible",t),s(T,"isBufferLengthCompatibleShape",a),s(T,"isCastingMode",r),s(T,"isColumnMajor",i),s(T,"isColumnMajorContiguous",d),s(T,"isComplexFloatingPointDataType",n),s(T,"isContiguous",m),s(T,"isDataType",o),s(T,"isFloatingPointDataType",l),s(T,"isIndexMode",p),s(T,"isIntegralDataType",j),s(T,"isNumericDataType",g),s(T,"isOrder",b),s(T,"isReadOnly",h),s(T,"isRealFloatingPointDataType",f),s(T,"isRowMajor",y),s(T,"isRowMajorContiguous",x),s(T,"isSafeDataTypeCast",c),s(T,"isSameKindDataTypeCast",u),s(T,"isSignedIntegerDataType",v),s(T,"isSingleSegmentCompatible",C),s(T,"isUnsignedIntegerDataType",D);export{T as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..043ba3e --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegralDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integral-data-type}\n*/\nimport isIntegralDataType from '@stdlib/ndarray-base-assert-is-integral-data-type';\nsetReadOnly( ns, 'isIntegralDataType', isIntegralDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegralDataType","isNumericDataType","isOrder","isReadOnly","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;orLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,qBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,8BAAAiB,GAUAhB,EAAAD,EAAA,aAAAkB,GAUAjB,EAAAD,EAAA,uBAAAmB,GAUAlB,EAAAD,EAAA,qBAAAoB,GAUAnB,EAAAD,EAAA,yBAAAqB,GAUApB,EAAAD,EAAA,0BAAAsB,GAUArB,EAAAD,EAAA,4BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index a972e35..0000000 --- a/lib/index.js +++ /dev/null @@ -1,249 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegralDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integral-data-type} -*/ -setReadOnly( ns, 'isIntegralDataType', require( '@stdlib/ndarray-base-assert-is-integral-data-type' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 3b0e5b2..8f7b74e 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,73 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.8", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.8", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.8", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-integral-data-type": "github:stdlib-js/ndarray-base-assert-is-integral-data-type#main", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "github:stdlib-js/ndarray-base-assert-is-numeric-data-type#main", - "@stdlib/ndarray-base-assert-is-order": "^0.0.7", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.1", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-real-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type#main", - "@stdlib/utils-define-read-only-property": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/math-base-special-abs": "^0.0.6", - "@stdlib/math-base-special-floor": "^0.0.8", - "@stdlib/ndarray-array": "^0.0.9", - "@stdlib/ndarray-base-iteration-order": "^0.0.8", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.8", - "@stdlib/ndarray-base-numel": "^0.0.8", - "@stdlib/ndarray-base-shape2strides": "^0.0.8", - "@stdlib/ndarray-base-strides2offset": "^0.0.8", - "@stdlib/ndarray-casting-modes": "^0.0.8", - "@stdlib/ndarray-dtypes": "^0.0.9", - "@stdlib/ndarray-index-modes": "^0.0.8", - "@stdlib/ndarray-orders": "^0.0.8", - "@stdlib/ndarray-safe-casts": "^0.0.8", - "@stdlib/ndarray-same-kind-casts": "^0.0.8", - "@stdlib/random-base-discrete-uniform": "^0.0.6", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -131,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5e64d6e --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From e283e34efbdcd998579bb3ca6c5f41e931cc9cf8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 2 Apr 2023 20:27:16 +0000 Subject: [PATCH 050/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2c0df32..1f969e7 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type#main", - "@stdlib/utils-define-read-only-property": "^0.0.8" + "@stdlib/utils-define-read-only-property": "^0.0.8", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", @@ -131,4 +132,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From cbbe477f375f23b452278cfc359d91e0d7ba03b2 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 2 Apr 2023 20:28:29 +0000 Subject: [PATCH 051/183] Remove files --- index.d.ts | 443 ---- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6625 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 3c86497..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integral-data-type@esm/index.mjs";export{default as isIntegralDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integral-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var T={};s(T,"isAllowedDataTypeCast",e),s(T,"isBufferLengthCompatible",t),s(T,"isBufferLengthCompatibleShape",a),s(T,"isCastingMode",r),s(T,"isColumnMajor",i),s(T,"isColumnMajorContiguous",d),s(T,"isComplexFloatingPointDataType",n),s(T,"isContiguous",m),s(T,"isDataType",o),s(T,"isFloatingPointDataType",l),s(T,"isIndexMode",p),s(T,"isIntegralDataType",j),s(T,"isNumericDataType",g),s(T,"isOrder",b),s(T,"isReadOnly",h),s(T,"isRealFloatingPointDataType",f),s(T,"isRowMajor",y),s(T,"isRowMajorContiguous",x),s(T,"isSafeDataTypeCast",c),s(T,"isSameKindDataTypeCast",u),s(T,"isSignedIntegerDataType",v),s(T,"isSingleSegmentCompatible",C),s(T,"isUnsignedIntegerDataType",D);export{T as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 043ba3e..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegralDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integral-data-type}\n*/\nimport isIntegralDataType from '@stdlib/ndarray-base-assert-is-integral-data-type';\nsetReadOnly( ns, 'isIntegralDataType', isIntegralDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegralDataType","isNumericDataType","isOrder","isReadOnly","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;orLAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,qBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,8BAAAiB,GAUAhB,EAAAD,EAAA,aAAAkB,GAUAjB,EAAAD,EAAA,uBAAAmB,GAUAlB,EAAAD,EAAA,qBAAAoB,GAUAnB,EAAAD,EAAA,yBAAAqB,GAUApB,EAAAD,EAAA,0BAAAsB,GAUArB,EAAAD,EAAA,4BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 5e64d6e..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From e2bb413a3bb136d7164a8f0fb642d543ae2ed1ee Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 2 Apr 2023 20:29:55 +0000 Subject: [PATCH 052/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 96 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 6221 insertions(+), 3615 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..b6a2285 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integral-data-type@esm/index.mjs";export{default as isIntegralDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integral-data-type@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegralDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",x),s(w,"isRowMajorContiguous",c),s(w,"isSafeDataTypeCast",u),s(w,"isSameKindDataTypeCast",v),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..8cd1635 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegralDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integral-data-type}\n*/\nimport isIntegralDataType from '@stdlib/ndarray-base-assert-is-integral-data-type';\nsetReadOnly( ns, 'isIntegralDataType', isIntegralDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegralDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;85LAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,qBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index efab8c8..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegralDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integral-data-type} -*/ -setReadOnly( ns, 'isIntegralDataType', require( '@stdlib/ndarray-base-assert-is-integral-data-type' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 1f969e7..8f7b74e 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,74 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.8", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.8", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.8", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-integral-data-type": "github:stdlib-js/ndarray-base-assert-is-integral-data-type#main", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "github:stdlib-js/ndarray-base-assert-is-numeric-data-type#main", - "@stdlib/ndarray-base-assert-is-order": "^0.0.7", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "github:stdlib-js/ndarray-base-assert-is-real-data-type#main", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-real-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type#main", - "@stdlib/utils-define-read-only-property": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/math-base-special-abs": "^0.0.6", - "@stdlib/math-base-special-floor": "^0.0.8", - "@stdlib/ndarray-array": "^0.0.9", - "@stdlib/ndarray-base-iteration-order": "^0.0.8", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.8", - "@stdlib/ndarray-base-numel": "^0.0.8", - "@stdlib/ndarray-base-shape2strides": "^0.0.8", - "@stdlib/ndarray-base-strides2offset": "^0.0.8", - "@stdlib/ndarray-casting-modes": "^0.0.8", - "@stdlib/ndarray-dtypes": "^0.0.9", - "@stdlib/ndarray-index-modes": "^0.0.8", - "@stdlib/ndarray-orders": "^0.0.8", - "@stdlib/ndarray-safe-casts": "^0.0.8", - "@stdlib/ndarray-same-kind-casts": "^0.0.8", - "@stdlib/random-base-discrete-uniform": "^0.0.6", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -132,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..46a029d --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From a35bb6430962c121ab4c2493a586f35655d20f57 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 2 Apr 2023 22:45:02 +0000 Subject: [PATCH 053/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8e4452b..6ff4469 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type#main", - "@stdlib/utils-define-read-only-property": "^0.0.8" + "@stdlib/utils-define-read-only-property": "^0.0.8", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", @@ -131,4 +132,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 26d936c5116ca0d8641d198fb1f31d5dae2812ef Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 2 Apr 2023 22:45:59 +0000 Subject: [PATCH 054/183] Remove files --- index.d.ts | 443 ---- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6625 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index b6a2285..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integral-data-type@esm/index.mjs";export{default as isIntegralDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integral-data-type@esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegralDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",x),s(w,"isRowMajorContiguous",c),s(w,"isSafeDataTypeCast",u),s(w,"isSameKindDataTypeCast",v),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 8cd1635..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegralDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integral-data-type}\n*/\nimport isIntegralDataType from '@stdlib/ndarray-base-assert-is-integral-data-type';\nsetReadOnly( ns, 'isIntegralDataType', isIntegralDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegralDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;85LAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,qBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 46a029d..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 8994d2952612122c39e1164c4afe808f78f4f7f9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 2 Apr 2023 22:47:12 +0000 Subject: [PATCH 055/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 96 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 6221 insertions(+), 3615 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..d233a94 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",x),s(w,"isRowMajorContiguous",c),s(w,"isSafeDataTypeCast",u),s(w,"isSameKindDataTypeCast",v),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..4810259 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;y6LAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 19cea5d..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 6ff4469..8f7b74e 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,74 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.8", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.8", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.8", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "github:stdlib-js/ndarray-base-assert-is-numeric-data-type#main", - "@stdlib/ndarray-base-assert-is-order": "^0.0.7", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "github:stdlib-js/ndarray-base-assert-is-real-data-type#main", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-real-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type#main", - "@stdlib/utils-define-read-only-property": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/math-base-special-abs": "^0.0.6", - "@stdlib/math-base-special-floor": "^0.0.8", - "@stdlib/ndarray-array": "^0.0.9", - "@stdlib/ndarray-base-iteration-order": "^0.0.8", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.8", - "@stdlib/ndarray-base-numel": "^0.0.8", - "@stdlib/ndarray-base-shape2strides": "^0.0.8", - "@stdlib/ndarray-base-strides2offset": "^0.0.8", - "@stdlib/ndarray-casting-modes": "^0.0.8", - "@stdlib/ndarray-dtypes": "^0.0.9", - "@stdlib/ndarray-index-modes": "^0.0.8", - "@stdlib/ndarray-orders": "^0.0.8", - "@stdlib/ndarray-safe-casts": "^0.0.8", - "@stdlib/ndarray-same-kind-casts": "^0.0.8", - "@stdlib/random-base-discrete-uniform": "^0.0.6", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -132,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..78b8719 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 5e661cd8d1b87b40691223ff0fa129c8af7260ad Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 08:23:08 +0000 Subject: [PATCH 056/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8e4452b..6ff4469 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type#main", - "@stdlib/utils-define-read-only-property": "^0.0.8" + "@stdlib/utils-define-read-only-property": "^0.0.8", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", @@ -131,4 +132,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 845f943184ae7b561cbdf68b37f22c00b6adce9e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 08:23:36 +0000 Subject: [PATCH 057/183] Remove files --- index.d.ts | 443 ---- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 6625 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index aa44e7c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index d233a94..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",x),s(w,"isRowMajorContiguous",c),s(w,"isSafeDataTypeCast",u),s(w,"isSameKindDataTypeCast",v),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 4810259..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;y6LAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 78b8719..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 7836c6b8b01e94dd7a052ecca4e04b8bcdecd49c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 08:24:58 +0000 Subject: [PATCH 058/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 73 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 96 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 6221 insertions(+), 3615 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -124,7 +123,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -186,37 +185,37 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..d233a94 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",x),s(w,"isRowMajorContiguous",c),s(w,"isSafeDataTypeCast",u),s(w,"isSameKindDataTypeCast",v),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..4810259 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;y6LAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 19cea5d..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 6ff4469..8f7b74e 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,74 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.8", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.8", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.8", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "github:stdlib-js/ndarray-base-assert-is-numeric-data-type#main", - "@stdlib/ndarray-base-assert-is-order": "^0.0.7", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "github:stdlib-js/ndarray-base-assert-is-real-data-type#main", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-real-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type#main", - "@stdlib/utils-define-read-only-property": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/math-base-special-abs": "^0.0.6", - "@stdlib/math-base-special-floor": "^0.0.8", - "@stdlib/ndarray-array": "^0.0.9", - "@stdlib/ndarray-base-iteration-order": "^0.0.8", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.8", - "@stdlib/ndarray-base-numel": "^0.0.8", - "@stdlib/ndarray-base-shape2strides": "^0.0.8", - "@stdlib/ndarray-base-strides2offset": "^0.0.8", - "@stdlib/ndarray-casting-modes": "^0.0.8", - "@stdlib/ndarray-dtypes": "^0.0.9", - "@stdlib/ndarray-index-modes": "^0.0.8", - "@stdlib/ndarray-orders": "^0.0.8", - "@stdlib/ndarray-safe-casts": "^0.0.8", - "@stdlib/ndarray-same-kind-casts": "^0.0.8", - "@stdlib/random-base-discrete-uniform": "^0.0.6", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -132,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..6089869 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From a8caa917ebc79b4486963ba1c712636321e3a576 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 17:12:10 +0000 Subject: [PATCH 059/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8e4452b..6ff4469 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type#main", - "@stdlib/utils-define-read-only-property": "^0.0.8" + "@stdlib/utils-define-read-only-property": "^0.0.8", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", @@ -131,4 +132,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From a54cb15088db7906bec1d0d971f68743bba20d81 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 17:12:39 +0000 Subject: [PATCH 060/183] Remove files --- index.d.ts | 820 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7002 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a0a11fd..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index d233a94..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",x),s(w,"isRowMajorContiguous",c),s(w,"isSafeDataTypeCast",u),s(w,"isSameKindDataTypeCast",v),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 4810259..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;y6LAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 6089869..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From e2acbba0dd7d5e5c4da27938b45286bdedb6facf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 13 Apr 2023 17:14:04 +0000 Subject: [PATCH 061/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 798 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 89 +- branches.md | 53 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 96 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 33 files changed, 6229 insertions(+), 3623 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 3e8e2db..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,798 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -132,7 +131,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -194,53 +193,53 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..d233a94 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",x),s(w,"isRowMajorContiguous",c),s(w,"isSafeDataTypeCast",u),s(w,"isSameKindDataTypeCast",v),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..4810259 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;y6LAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 19cea5d..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 6ff4469..8f7b74e 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,74 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.8", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.8", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.8", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "github:stdlib-js/ndarray-base-assert-is-numeric-data-type#main", - "@stdlib/ndarray-base-assert-is-order": "^0.0.7", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "github:stdlib-js/ndarray-base-assert-is-real-data-type#main", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-real-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type#main", - "@stdlib/utils-define-read-only-property": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "github:stdlib-js/array-base-assert-contains#main", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/math-base-special-abs": "^0.0.6", - "@stdlib/math-base-special-floor": "^0.0.8", - "@stdlib/ndarray-array": "^0.0.9", - "@stdlib/ndarray-base-iteration-order": "^0.0.8", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.8", - "@stdlib/ndarray-base-numel": "^0.0.8", - "@stdlib/ndarray-base-shape2strides": "^0.0.8", - "@stdlib/ndarray-base-strides2offset": "^0.0.8", - "@stdlib/ndarray-casting-modes": "^0.0.8", - "@stdlib/ndarray-dtypes": "^0.0.9", - "@stdlib/ndarray-index-modes": "^0.0.8", - "@stdlib/ndarray-orders": "^0.0.8", - "@stdlib/ndarray-safe-casts": "^0.0.8", - "@stdlib/ndarray-same-kind-casts": "^0.0.8", - "@stdlib/random-base-discrete-uniform": "^0.0.6", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -132,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..4b4cd0f --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 68838a8..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.equal( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 3b983a5b83137a256891034599a22de6af033644 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 20 Aug 2023 00:23:15 +0000 Subject: [PATCH 062/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f195561..61ae339 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.0.1", - "@stdlib/utils-define-read-only-property": "^0.0.8" + "@stdlib/utils-define-read-only-property": "^0.0.8", + "@stdlib/error-tools-fmtprodmsg": "^0.0.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.0.1", @@ -131,4 +132,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From e92808d5b7704fb01ddb667959923a66a7a11bb7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 20 Aug 2023 00:23:42 +0000 Subject: [PATCH 063/183] Remove files --- index.d.ts | 820 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7002 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a0a11fd..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 2.0 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index d233a94..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",x),s(w,"isRowMajorContiguous",c),s(w,"isSafeDataTypeCast",u),s(w,"isSameKindDataTypeCast",v),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 4810259..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;y6LAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 4b4cd0f..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 20aed33e2c5ced9f64cded14d225a3f252df0811 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 20 Aug 2023 00:25:27 +0000 Subject: [PATCH 064/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 783 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 89 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 96 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 36 files changed, 6229 insertions(+), 3621 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0fd4d6c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 91f2b93..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,783 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v2 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -132,7 +131,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -194,53 +193,53 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index eaba774..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c7e80e2..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..590049f --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.0.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.0.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.0.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.0.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.0.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.0.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.0.1-esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",x),s(w,"isRowMajorContiguous",c),s(w,"isSafeDataTypeCast",u),s(w,"isSameKindDataTypeCast",v),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..124f66e --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;i+LAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 19cea5d..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 61ae339..8f7b74e 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.0.7", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,74 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.0.8", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-column-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.0.1", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.0.8", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.8", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.0.1", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.0.7", - "@stdlib/ndarray-base-assert-is-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.0.1", - "@stdlib/ndarray-base-assert-is-order": "^0.0.7", - "@stdlib/ndarray-base-assert-is-read-only": "^0.0.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "github:stdlib-js/ndarray-base-assert-is-real-data-type#main", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-real-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-row-major": "^0.0.6", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.0.6", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.0.9", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.0.8", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.0.1", - "@stdlib/utils-define-read-only-property": "^0.0.8", - "@stdlib/error-tools-fmtprodmsg": "^0.0.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.0.1", - "@stdlib/assert-is-boolean": "^0.0.8", - "@stdlib/bench": "^0.0.12", - "@stdlib/math-base-special-abs": "^0.0.6", - "@stdlib/math-base-special-floor": "^0.0.8", - "@stdlib/ndarray-array": "^0.0.9", - "@stdlib/ndarray-base-iteration-order": "^0.0.8", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.0.8", - "@stdlib/ndarray-base-numel": "^0.0.8", - "@stdlib/ndarray-base-shape2strides": "^0.0.8", - "@stdlib/ndarray-base-strides2offset": "^0.0.8", - "@stdlib/ndarray-casting-modes": "^0.0.8", - "@stdlib/ndarray-dtypes": "^0.0.9", - "@stdlib/ndarray-index-modes": "^0.0.8", - "@stdlib/ndarray-orders": "^0.0.8", - "@stdlib/ndarray-safe-casts": "^0.0.8", - "@stdlib/ndarray-same-kind-casts": "^0.0.8", - "@stdlib/random-base-discrete-uniform": "^0.0.6", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/utils-keys": "^0.0.7", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -132,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..20cfdbc --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 54eea8d1a8ecd16557b7286cff74dcb8e607fcd4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:09:10 +0000 Subject: [PATCH 065/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6fb06e2..a05df0b 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.0.1", - "@stdlib/utils-define-read-only-property": "^0.1.0" + "@stdlib/utils-define-read-only-property": "^0.1.0", + "@stdlib/error-tools-fmtprodmsg": "^0.1.0" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.1.0", @@ -131,4 +132,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 5615ccdeea3ef24ace97257a77c25121f3318db3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:44:20 +0000 Subject: [PATCH 066/183] Remove files --- index.d.ts | 820 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7002 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 39fdf52..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 590049f..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.0.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.0.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.0.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.0.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.0.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.0.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.0.1-esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",x),s(w,"isRowMajorContiguous",c),s(w,"isSafeDataTypeCast",u),s(w,"isSameKindDataTypeCast",v),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 124f66e..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;i+LAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 20cfdbc..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 713e3b8417a0c6a0876354acac289181eaec6c17 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 17:46:51 +0000 Subject: [PATCH 067/183] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 62 - .github/workflows/cancel.yml | 56 - .github/workflows/close_pull_requests.yml | 44 - .github/workflows/examples.yml | 62 - .github/workflows/npm_downloads.yml | 108 - .github/workflows/productionize.yml | 783 --- .github/workflows/publish.yml | 242 - .github/workflows/test.yml | 97 - .github/workflows/test_bundles.yml | 180 - .github/workflows/test_coverage.yml | 123 - .github/workflows/test_install.yml | 83 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 89 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 96 +- stats.html | 6177 +++++++++++++++++++++ test/test.js | 40 - 37 files changed, 6229 insertions(+), 3656 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 06a9a75..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index a00dbe5..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,56 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - uses: styfle/cancel-workflow-action@0.11.0 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 932a11f..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,44 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: superbrothers/close-pull-request@v3 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 7902a7d..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,62 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout the repository' - uses: actions/checkout@v3 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index d093166..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,108 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - uses: actions/upload-artifact@v3 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - uses: distributhor/workflow-webhook@v3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 91f2b93..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,783 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - uses: actions/checkout@v3 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/checkout@v3 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v2 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - uses: actions/checkout@v3 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - uses: actions/setup-node@v3 - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -143,7 +142,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -205,53 +204,53 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index eaba774..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c7e80e2..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..fc23c0f --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.0-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.0.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.0.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.0.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.0.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.0-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.0.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.0.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.0.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.0-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.0-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.0.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.0.1-esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",v),s(w,"isRowMajorContiguous",x),s(w,"isSafeDataTypeCast",c),s(w,"isSameKindDataTypeCast",u),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..14a0cb2 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;8pMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 19cea5d..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index a05df0b..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,74 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.0", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.0.1", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.0.8", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.0.1", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.0", - "@stdlib/ndarray-base-assert-is-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.0.1", - "@stdlib/ndarray-base-assert-is-order": "^0.1.0", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-data-type": "github:stdlib-js/ndarray-base-assert-is-real-data-type#main", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "github:stdlib-js/ndarray-base-assert-is-real-floating-point-data-type#main", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "github:stdlib-js/ndarray-base-assert-is-signed-integer-data-type#main", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.0.1", - "@stdlib/utils-define-read-only-property": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.0" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/math-base-special-abs": "^0.1.0", - "@stdlib/math-base-special-floor": "^0.1.0", - "@stdlib/ndarray-array": "^0.0.9", - "@stdlib/ndarray-base-iteration-order": "^0.1.0", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.0", - "@stdlib/ndarray-base-shape2strides": "^0.1.0", - "@stdlib/ndarray-base-strides2offset": "^0.1.0", - "@stdlib/ndarray-casting-modes": "^0.1.0", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.0", - "@stdlib/ndarray-orders": "^0.1.0", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.0.6", - "@stdlib/random-base-randu": "^0.0.8", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -132,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..ceae6ec --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 609ff35c887d223ddcda8d0d0a8d3b905c6e92ff Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 24 Sep 2023 18:00:33 +0000 Subject: [PATCH 068/183] Update README.md for ESM bundle v0.1.0 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c33d26d..112a9df 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@v0.1.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { isAllowedDataTypeCast, isBufferLengthCompatible, isBufferLengthCompatibleShape, isCastingMode, isColumnMajor, isColumnMajorContiguous, isComplexFloatingPointDataType, isContiguous, isDataType, isFloatingPointDataType, isIndexMode, isIntegerDataType, isNumericDataType, isOrder, isReadOnly, isRealDataType, isRealFloatingPointDataType, isRowMajor, isRowMajorContiguous, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSingleSegmentCompatible, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@esm/index.mjs'; +import { isAllowedDataTypeCast, isBufferLengthCompatible, isBufferLengthCompatibleShape, isCastingMode, isColumnMajor, isColumnMajorContiguous, isComplexFloatingPointDataType, isContiguous, isDataType, isFloatingPointDataType, isIndexMode, isIntegerDataType, isNumericDataType, isOrder, isReadOnly, isRealDataType, isRealFloatingPointDataType, isRowMajor, isRowMajorContiguous, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSingleSegmentCompatible, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@v0.1.0-esm/index.mjs'; ``` #### ns @@ -112,7 +112,7 @@ var o = ns; - - - - From df9248ecd960dc7c6cc6f424ae09fdbefce3e3dd Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 3 Oct 2023 02:29:48 +0000 Subject: [PATCH 072/183] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 247 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 89 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 96 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 40 - test/test.js | 40 - 39 files changed, 6229 insertions(+), 3755 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 9716ffa..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-10-01T05:31:07.232Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index ccef2e5..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -143,7 +142,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -205,53 +204,53 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index eaba774..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c7e80e2..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..8a74482 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.0-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.0-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.0-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.0-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",v),s(w,"isRowMajorContiguous",x),s(w,"isSafeDataTypeCast",c),s(w,"isSameKindDataTypeCast",u),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..4396434 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;kvMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 19cea5d..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f21fa5f..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,74 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.0", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.0", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.0", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.0", - "@stdlib/error-tools-fmtprodmsg": "^0.1.0" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.0", - "@stdlib/bench": "^0.1.0", - "@stdlib/math-base-special-abs": "^0.1.0", - "@stdlib/math-base-special-floor": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-iteration-order": "^0.1.0", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.0", - "@stdlib/ndarray-base-numel": "^0.1.0", - "@stdlib/ndarray-base-shape2strides": "^0.1.0", - "@stdlib/ndarray-base-strides2offset": "^0.1.0", - "@stdlib/ndarray-casting-modes": "^0.1.0", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.0", - "@stdlib/ndarray-orders": "^0.1.0", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -132,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..ff32e9a --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index 4af947f..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 10f6d42d974c80f38bc6e522adb86593b394ee37 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 5 Oct 2023 20:13:35 +0000 Subject: [PATCH 073/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 77feca3..3e2bf83 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" + "@stdlib/utils-define-read-only-property": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.1.0", @@ -131,4 +132,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 2a29ae1980d1a8c7b599002e7b19b4a5d64dd8d5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 7 Oct 2023 03:29:03 +0000 Subject: [PATCH 074/183] Remove files --- index.d.ts | 820 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7002 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 39fdf52..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 8a74482..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.0-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.0-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.0-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.0-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",v),s(w,"isRowMajorContiguous",x),s(w,"isSafeDataTypeCast",c),s(w,"isSameKindDataTypeCast",u),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 4396434..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;kvMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index ff32e9a..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 2a302a5415fae2d344bb54246f2a090ea03facb6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 7 Oct 2023 03:32:43 +0000 Subject: [PATCH 075/183] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 247 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 89 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 258 - package.json | 96 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 40 - test/test.js | 40 - 38 files changed, 6229 insertions(+), 3754 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index ccef2e5..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -143,7 +142,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -205,53 +204,53 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index eaba774..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index c7e80e2..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..0b95559 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",v),s(w,"isRowMajorContiguous",x),s(w,"isSafeDataTypeCast",c),s(w,"isSameKindDataTypeCast",u),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..4396434 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;kvMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 19cea5d..0000000 --- a/lib/index.js +++ /dev/null @@ -1,258 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 3e2bf83..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,74 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/math-base-special-abs": "^0.1.0", - "@stdlib/math-base-special-floor": "^0.1.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-iteration-order": "^0.1.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.1", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-shape2strides": "^0.1.1", - "@stdlib/ndarray-base-strides2offset": "^0.1.1", - "@stdlib/ndarray-casting-modes": "^0.1.1", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.1", - "@stdlib/ndarray-orders": "^0.1.1", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -132,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..4afca55 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index 4af947f..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 989c143d5e2cbea47246be0727216343cf763ef7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 14 Oct 2023 10:29:16 +0000 Subject: [PATCH 076/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7f1e4b1..54880bb 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" + "@stdlib/utils-define-read-only-property": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.1.0", @@ -134,4 +135,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From ebb3e420d7c20a2daafd9d5af27cd9430a432515 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 14 Oct 2023 10:50:13 +0000 Subject: [PATCH 077/183] Remove files --- index.d.ts | 820 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7002 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 39fdf52..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 0b95559..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var w={};s(w,"isAllowedDataTypeCast",e),s(w,"isBufferLengthCompatible",t),s(w,"isBufferLengthCompatibleShape",a),s(w,"isCastingMode",r),s(w,"isColumnMajor",i),s(w,"isColumnMajorContiguous",d),s(w,"isComplexFloatingPointDataType",n),s(w,"isContiguous",m),s(w,"isDataType",o),s(w,"isFloatingPointDataType",l),s(w,"isIndexMode",p),s(w,"isIntegerDataType",j),s(w,"isNumericDataType",b),s(w,"isOrder",g),s(w,"isReadOnly",h),s(w,"isRealDataType",y),s(w,"isRealFloatingPointDataType",f),s(w,"isRowMajor",v),s(w,"isRowMajorContiguous",x),s(w,"isSafeDataTypeCast",c),s(w,"isSameKindDataTypeCast",u),s(w,"isSignedIntegerDataType",C),s(w,"isSingleSegmentCompatible",D),s(w,"isUnsignedIntegerDataType",T);export{w as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 4396434..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;kvMAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,oBAAAc,GAUAb,EAAAD,EAAA,UAAAe,GAUAd,EAAAD,EAAA,aAAAgB,GAUAf,EAAAD,EAAA,iBAAAiB,GAUAhB,EAAAD,EAAA,8BAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,uBAAAoB,GAUAnB,EAAAD,EAAA,qBAAAqB,GAUApB,EAAAD,EAAA,yBAAAsB,GAUArB,EAAAD,EAAA,0BAAAuB,GAUAtB,EAAAD,EAAA,4BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 4afca55..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 85a0e475405aab26078f0bde393e5db9ec5faf49 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 14 Oct 2023 10:54:49 +0000 Subject: [PATCH 078/183] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 247 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 89 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 99 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6229 insertions(+), 3759 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index ccef2e5..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -143,7 +142,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -205,53 +204,53 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..75640ec --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..0960d36 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;8/MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 54880bb..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,77 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "github:stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast#main", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-cartesian-square": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/math-base-special-abs": "^0.1.1", - "@stdlib/math-base-special-floor": "^0.1.1", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-iteration-order": "^0.1.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.1", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-shape2strides": "^0.1.1", - "@stdlib/ndarray-base-strides2offset": "^0.1.1", - "@stdlib/ndarray-casting-modes": "^0.1.1", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.1", - "@stdlib/ndarray-mostly-safe-casts": "github:stdlib-js/ndarray-mostly-safe-casts#main", - "@stdlib/ndarray-orders": "^0.1.1", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -135,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..625c32f --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From e73bfef44b324ce692e5f9c318f592d302524e1c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 28 Oct 2023 20:35:38 +0000 Subject: [PATCH 079/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2eb8bd1..f57d4d4 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" + "@stdlib/utils-define-read-only-property": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.1.0", @@ -134,4 +135,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 64d4a3254c2f4ca9ba1986af9ed6ac39a8187e03 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 28 Oct 2023 20:37:28 +0000 Subject: [PATCH 080/183] Remove files --- index.d.ts | 820 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7002 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 39fdf52..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 75640ec..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 0960d36..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;8/MAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 625c32f..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 54e30bca3f6dda1d11c302a7862f636a06c90618 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 28 Oct 2023 20:42:03 +0000 Subject: [PATCH 081/183] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 91 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 99 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6230 insertions(+), 3768 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index ccef2e5..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -144,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,55 +205,55 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..71e5bf2 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f57d4d4..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,77 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-cartesian-square": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/math-base-special-abs": "^0.1.1", - "@stdlib/math-base-special-floor": "^0.1.1", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-iteration-order": "^0.1.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.1", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-shape2strides": "^0.1.1", - "@stdlib/ndarray-base-strides2offset": "^0.1.1", - "@stdlib/ndarray-casting-modes": "^0.1.1", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.1.0", - "@stdlib/ndarray-orders": "^0.1.1", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -135,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..feada60 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 6f3e5a7cb757293b7223ded79c4641b226203e39 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 31 Oct 2023 06:01:17 +0000 Subject: [PATCH 082/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2eb8bd1..f57d4d4 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" + "@stdlib/utils-define-read-only-property": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.1.0", @@ -134,4 +135,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From e71c65747712a2128d5c05275e9a44bbc90bc91c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 31 Oct 2023 06:08:09 +0000 Subject: [PATCH 083/183] Remove files --- index.d.ts | 820 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7002 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 39fdf52..0000000 --- a/index.d.ts +++ /dev/null @@ -1,820 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 71e5bf2..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index feada60..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From fe578bd135ae0480e48243c1192c5dfe52a556d4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 31 Oct 2023 06:12:35 +0000 Subject: [PATCH 084/183] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 91 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 99 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6230 insertions(+), 3768 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index ccef2e5..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -144,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,55 +205,55 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..71e5bf2 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f57d4d4..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,77 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-cartesian-square": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/math-base-special-abs": "^0.1.1", - "@stdlib/math-base-special-floor": "^0.1.1", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-iteration-order": "^0.1.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.1", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-shape2strides": "^0.1.1", - "@stdlib/ndarray-base-strides2offset": "^0.1.1", - "@stdlib/ndarray-casting-modes": "^0.1.1", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.1.0", - "@stdlib/ndarray-orders": "^0.1.1", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -135,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..a7d3e85 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 5bc1fe8e39d02863f178fdf64d93761e44b04ff7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 1 Nov 2023 17:55:50 +0000 Subject: [PATCH 085/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2eb8bd1..f57d4d4 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" + "@stdlib/utils-define-read-only-property": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.1.0", @@ -134,4 +135,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 0739048703b8898e74269ffc5d6b6f58897f84f9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 02:35:12 +0000 Subject: [PATCH 086/183] Remove files --- index.d.ts | 840 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7022 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index dea5915..0000000 --- a/index.d.ts +++ /dev/null @@ -1,840 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 71e5bf2..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index a7d3e85..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 8c5e683362a6cebf27b53ac4a10fc69e8561ded7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 02:39:05 +0000 Subject: [PATCH 087/183] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 91 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 99 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6230 insertions(+), 3769 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index d0a5524..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-11-01T05:51:26.164Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index ccef2e5..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -144,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,55 +205,55 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..71e5bf2 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f57d4d4..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,77 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-cartesian-square": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/math-base-special-abs": "^0.1.1", - "@stdlib/math-base-special-floor": "^0.1.1", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-iteration-order": "^0.1.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.1", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-shape2strides": "^0.1.1", - "@stdlib/ndarray-base-strides2offset": "^0.1.1", - "@stdlib/ndarray-casting-modes": "^0.1.1", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.1.0", - "@stdlib/ndarray-orders": "^0.1.1", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -135,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..af3bf0a --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 41f2cf2fe52c58cf324803f542f37633bb6c14bf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 21:05:12 +0000 Subject: [PATCH 088/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2eb8bd1..f57d4d4 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" + "@stdlib/utils-define-read-only-property": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.1.0", @@ -134,4 +135,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From f1f28447c1358f37bc958caaa7c87ae85f8ce06c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 23:32:28 +0000 Subject: [PATCH 089/183] Remove files --- index.d.ts | 840 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7022 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index dea5915..0000000 --- a/index.d.ts +++ /dev/null @@ -1,840 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* tslint:disable:max-line-length */ -/* tslint:disable:max-file-line-count */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 71e5bf2..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index af3bf0a..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From cdbcabc7d42b376f3ce8810758b765590bf1b5c5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 3 Nov 2023 23:35:13 +0000 Subject: [PATCH 090/183] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 91 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 99 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6230 insertions(+), 3768 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index ccef2e5..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -144,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,55 +205,55 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index 1cdbcd0..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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-unused-expression */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..71e5bf2 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f57d4d4..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,77 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-cartesian-square": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/bench": "^0.1.0", - "@stdlib/math-base-special-abs": "^0.1.1", - "@stdlib/math-base-special-floor": "^0.1.1", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-iteration-order": "^0.1.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.1", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-shape2strides": "^0.1.1", - "@stdlib/ndarray-base-strides2offset": "^0.1.1", - "@stdlib/ndarray-casting-modes": "^0.1.1", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.1.0", - "@stdlib/ndarray-orders": "^0.1.1", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -135,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..20d2f57 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 5862071af0ef3d9c4431103c7aae945c2928716d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Nov 2023 22:19:00 +0000 Subject: [PATCH 091/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c85ccac..f6a42c3 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" + "@stdlib/utils-define-read-only-property": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.1.0", @@ -134,4 +135,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From d4a93d38228db79027b0e642090166c310084ebe Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Nov 2023 23:38:37 +0000 Subject: [PATCH 092/183] Remove files --- index.d.ts | 839 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7021 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 63c312a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,839 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 71e5bf2..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 20d2f57..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 92f745275182b6dc87e2099cc04f8c3b1ea5f21e Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Nov 2023 23:43:20 +0000 Subject: [PATCH 093/183] Auto-generated commit --- .editorconfig | 186 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 91 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 99 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 38 files changed, 6230 insertions(+), 3768 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 13e9c39..0000000 --- a/.editorconfig +++ /dev/null @@ -1,186 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tslint.json` files: -[tslint.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index ccef2e5..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -144,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,55 +205,55 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..71e5bf2 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index f6a42c3..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,77 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-cartesian-square": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/bench": "^0.2.0", - "@stdlib/math-base-special-abs": "^0.1.1", - "@stdlib/math-base-special-floor": "^0.1.1", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-iteration-order": "^0.1.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.1", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-shape2strides": "^0.1.1", - "@stdlib/ndarray-base-strides2offset": "^0.1.1", - "@stdlib/ndarray-casting-modes": "^0.1.1", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.1.0", - "@stdlib/ndarray-orders": "^0.1.1", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -135,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..366da71 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 7b2b16f60966aa9a2d5108fb85542363ea188e14 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Dec 2023 14:03:39 +0000 Subject: [PATCH 094/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 75f7c27..4b5e619 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" + "@stdlib/utils-define-read-only-property": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.1.0", @@ -134,4 +135,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 0f6c748bfac04f43c481ee65f62fb7777d64ccbd Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 12:19:08 +0000 Subject: [PATCH 095/183] Remove files --- index.d.ts | 839 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7021 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 63c312a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,839 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 71e5bf2..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 366da71..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 804c3eb7cb334f6285db6d5ee79d243a41e58a41 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 2 Dec 2023 12:22:29 +0000 Subject: [PATCH 096/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 227 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 91 +- branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 99 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6230 insertions(+), 3764 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 3c6b9e7..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-12-01T05:56:28.210Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index ab56cca..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c1c45e7..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index ccef2e5..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA corresponding to v3.0.3: - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 265afda..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA corresponding to v4.1.0 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 16 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -144,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,55 +205,55 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..71e5bf2 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4b5e619..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,77 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-cartesian-square": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/bench": "^0.2.1", - "@stdlib/math-base-special-abs": "^0.1.1", - "@stdlib/math-base-special-floor": "^0.1.1", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-iteration-order": "^0.1.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.1", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-shape2strides": "^0.1.1", - "@stdlib/ndarray-base-strides2offset": "^0.1.1", - "@stdlib/ndarray-casting-modes": "^0.1.1", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.1.0", - "@stdlib/ndarray-orders": "^0.1.1", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -135,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..37ae53d --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 86fd117c309c00ee21d47e89c2665bfe17fa4de4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 08:25:42 +0000 Subject: [PATCH 097/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6ca0063..de15437 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" + "@stdlib/utils-define-read-only-property": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.1.0", @@ -135,4 +136,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 88a31a616d906692c61492dd2b4700bb4f5621a8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 15:04:35 +0000 Subject: [PATCH 098/183] Remove files --- index.d.ts | 839 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7021 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 63c312a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,839 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 71e5bf2..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 37ae53d..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From a5984f6883ecc8e8f65d9c40459c49e4a59dd872 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Jan 2024 15:05:13 +0000 Subject: [PATCH 099/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 91 +- SECURITY.md | 5 - branches.md | 53 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 100 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 6230 insertions(+), 3771 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index c1d3a07..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-01-01T05:26:28.398Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 30656c4..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c92f5c4..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index a4eeca0..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index e1e3539..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -144,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -206,55 +205,55 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 216b3ed..0000000 --- a/branches.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers. -- **deno**: [Deno][deno-url] branch for use in Deno. -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments. - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..5b44ed4 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index de15437..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,78 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-cartesian-square": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/math-base-special-abs": "^0.1.1", - "@stdlib/math-base-special-floor": "^0.1.1", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-flag": "github:stdlib-js/ndarray-base-flag#main", - "@stdlib/ndarray-base-iteration-order": "^0.1.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.1", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-shape2strides": "^0.1.1", - "@stdlib/ndarray-base-strides2offset": "^0.1.1", - "@stdlib/ndarray-casting-modes": "^0.1.1", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.1.0", - "@stdlib/ndarray-orders": "^0.1.1", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -136,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..bab50e2 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 683f4b92a745014b384422cbf465506a487faa82 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 09:02:50 +0000 Subject: [PATCH 100/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5834318..437875d 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1" + "@stdlib/utils-define-read-only-property": "^0.1.1", + "@stdlib/error-tools-fmtprodmsg": "^0.1.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.1.0", @@ -135,4 +136,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 5ea2f46ba61cfff38b2f085337df7e65542e9ae4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 14:23:25 +0000 Subject: [PATCH 101/183] Remove files --- index.d.ts | 839 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7021 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 63c312a..0000000 --- a/index.d.ts +++ /dev/null @@ -1,839 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( `@stdlib/ndarray/array` ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 5b44ed4..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index bab50e2..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 87881f0947f6e21843f826a072fab8b5279354f7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Feb 2024 14:24:13 +0000 Subject: [PATCH 102/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 128 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 93 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 100 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 6230 insertions(+), 3776 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index bb9845d..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-02-01T06:20:43.823Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 30656c4..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 3acd3a9..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA corresponding to v0.11.0 - uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index c92f5c4..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index a4eeca0..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index e1e3539..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA corresponding to v3.8.1 - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -146,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -211,55 +208,55 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..5b44ed4 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 437875d..b87e573 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.1.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,78 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.1.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.1.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-order": "^0.1.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.1.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.1.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.1.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.1.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0", - "@stdlib/utils-define-read-only-property": "^0.1.1", - "@stdlib/error-tools-fmtprodmsg": "^0.1.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.1.0", - "@stdlib/array-base-cartesian-square": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.1.1", - "@stdlib/math-base-special-abs": "^0.1.1", - "@stdlib/math-base-special-floor": "^0.1.1", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-flag": "^0.1.0", - "@stdlib/ndarray-base-iteration-order": "^0.1.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.1.1", - "@stdlib/ndarray-base-numel": "^0.1.1", - "@stdlib/ndarray-base-shape2strides": "^0.1.1", - "@stdlib/ndarray-base-strides2offset": "^0.1.1", - "@stdlib/ndarray-casting-modes": "^0.1.1", - "@stdlib/ndarray-dtypes": "^0.1.0", - "@stdlib/ndarray-index-modes": "^0.1.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.1.0", - "@stdlib/ndarray-orders": "^0.1.1", - "@stdlib/ndarray-safe-casts": "^0.1.0", - "@stdlib/ndarray-same-kind-casts": "^0.1.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.1.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -136,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..7cb3ee8 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 2143edcea517ad6a4e8d24a26c2e7289570fb735 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 01:20:52 +0000 Subject: [PATCH 103/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7dd0040..1c425a8 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.0", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.0", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.0", - "@stdlib/utils-define-read-only-property": "^0.2.0" + "@stdlib/utils-define-read-only-property": "^0.2.0", + "@stdlib/error-tools-fmtprodmsg": "^0.2.0" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.0", @@ -135,4 +136,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 1f6ae5d2676f1e71ca1c5382650b271495372c80 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 04:51:10 +0000 Subject: [PATCH 104/183] Remove files --- index.d.ts | 839 ------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 6177 ------------------------------------------------- 4 files changed, 7021 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 6b5270e..0000000 --- a/index.d.ts +++ /dev/null @@ -1,839 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 5b44ed4..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.1.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.1.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.1.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.1.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.1.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.1.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.1.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.1.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.1.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.1.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.1.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.1.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 7cb3ee8..0000000 --- a/stats.html +++ /dev/null @@ -1,6177 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From aebdd53adc1a98aea5b770e8a081a0c2cda7d1eb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 04:52:54 +0000 Subject: [PATCH 105/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 --- .github/workflows/publish.yml | 255 - .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 132 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 93 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 - package.json | 100 +- stats.html | 6177 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 6230 insertions(+), 3779 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 85f88c2..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA corresponding to v3.1.3 - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 9106b5d..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -146,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -211,55 +208,55 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..66fc87c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.0-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.0-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.0-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.0-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.0-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.0-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.0-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.0-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.0-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.1.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.0-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.0-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.1.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.1.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.1.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.1.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.0-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.1.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.0-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.0-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.0-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.0-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.1.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.1.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.1.0-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.0-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.0-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.0-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.0-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.1.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.0-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.0-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.1.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 1c425a8..daee2a0 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,78 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.2.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.0", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.0", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.0", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.0", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.0", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.0", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.0", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.0", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.0", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.0", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.0", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.0", - "@stdlib/ndarray-base-assert-is-order": "^0.2.0", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.0", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.0", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.0", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.0", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.0", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.0", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.0", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.0", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.0", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.0", - "@stdlib/utils-define-read-only-property": "^0.2.0", - "@stdlib/error-tools-fmtprodmsg": "^0.2.0" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.0", - "@stdlib/array-cartesian-square": "^0.1.0", - "@stdlib/assert-is-boolean": "^0.2.0", - "@stdlib/math-base-special-abs": "^0.2.0", - "@stdlib/math-base-special-floor": "^0.2.0", - "@stdlib/ndarray-array": "^0.1.0", - "@stdlib/ndarray-base-flag": "^0.2.0", - "@stdlib/ndarray-base-iteration-order": "^0.2.0", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.0", - "@stdlib/ndarray-base-numel": "^0.2.0", - "@stdlib/ndarray-base-shape2strides": "^0.2.0", - "@stdlib/ndarray-base-strides2offset": "^0.2.0", - "@stdlib/ndarray-casting-modes": "^0.2.0", - "@stdlib/ndarray-dtypes": "^0.2.0", - "@stdlib/ndarray-index-modes": "^0.2.0", - "@stdlib/ndarray-mostly-safe-casts": "^0.2.0", - "@stdlib/ndarray-orders": "^0.2.0", - "@stdlib/ndarray-safe-casts": "^0.2.0", - "@stdlib/ndarray-same-kind-casts": "^0.2.0", - "@stdlib/random-base-discrete-uniform": "^0.1.0", - "@stdlib/random-base-randu": "^0.1.0", - "@stdlib/utils-keys": "^0.2.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -136,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..04d9f75 --- /dev/null +++ b/stats.html @@ -0,0 +1,6177 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 3b8b33809fdd856a8bf5f186523683a721904e80 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 15 Feb 2024 06:38:07 +0000 Subject: [PATCH 106/183] Update README.md for ESM bundle v0.2.0 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d890bd1..9b98d1c 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@v0.2.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { isAllowedDataTypeCast, isBufferLengthCompatible, isBufferLengthCompatibleShape, isCastingMode, isColumnMajor, isColumnMajorContiguous, isComplexFloatingPointDataType, isContiguous, isDataType, isFloatingPointDataType, isIndexMode, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isOrder, isReadOnly, isRealDataType, isRealFloatingPointDataType, isRowMajor, isRowMajorContiguous, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSingleSegmentCompatible, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@esm/index.mjs'; +import { isAllowedDataTypeCast, isBufferLengthCompatible, isBufferLengthCompatibleShape, isCastingMode, isColumnMajor, isColumnMajorContiguous, isComplexFloatingPointDataType, isContiguous, isDataType, isFloatingPointDataType, isIndexMode, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isOrder, isReadOnly, isRealDataType, isRealFloatingPointDataType, isRowMajor, isRowMajorContiguous, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSingleSegmentCompatible, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@v0.2.0-esm/index.mjs'; ``` #### ns @@ -113,7 +113,7 @@ var o = ns; - - - - From 9498ec3f22318654f144419c20d50bd4419bfc15 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 21:22:01 +0000 Subject: [PATCH 110/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 ---- .github/workflows/publish.yml | 249 -- .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 132 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 228 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 93 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 -- package.json | 100 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4895 insertions(+), 3773 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 9106b5d..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -146,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -211,55 +208,55 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..4d21f67 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.0-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.0-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.0-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.0-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.0-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.0-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.0-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.0-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.0-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.0-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.0-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index e8e7196..b7b617a 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,78 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.1", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.1", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.1", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.1", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.1", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.1", - "@stdlib/array-cartesian-square": "^0.2.0", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/math-base-special-abs": "^0.2.1", - "@stdlib/math-base-special-floor": "^0.2.1", - "@stdlib/ndarray-array": "^0.2.0", - "@stdlib/ndarray-base-flag": "^0.2.1", - "@stdlib/ndarray-base-iteration-order": "^0.2.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.1", - "@stdlib/ndarray-base-numel": "^0.2.1", - "@stdlib/ndarray-base-shape2strides": "^0.2.1", - "@stdlib/ndarray-base-strides2offset": "^0.2.1", - "@stdlib/ndarray-casting-modes": "^0.2.1", - "@stdlib/ndarray-dtypes": "^0.2.1", - "@stdlib/ndarray-index-modes": "^0.2.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.2.1", - "@stdlib/ndarray-orders": "^0.2.1", - "@stdlib/ndarray-safe-casts": "^0.2.1", - "@stdlib/ndarray-same-kind-casts": "^0.2.1", - "@stdlib/random-base-discrete-uniform": "^0.2.0", - "@stdlib/random-base-randu": "^0.2.0", - "@stdlib/utils-keys": "^0.2.1", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -136,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..f4c21f3 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From d893ae10e79614053f65724207e4aeb0f88cce3c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 25 Feb 2024 22:00:51 +0000 Subject: [PATCH 111/183] Update README.md for ESM bundle v0.2.1 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0af7d43..51ee8ff 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@v0.2.1-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { isAllowedDataTypeCast, isBufferLengthCompatible, isBufferLengthCompatibleShape, isCastingMode, isColumnMajor, isColumnMajorContiguous, isComplexFloatingPointDataType, isContiguous, isDataType, isFloatingPointDataType, isIndexMode, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isOrder, isReadOnly, isRealDataType, isRealFloatingPointDataType, isRowMajor, isRowMajorContiguous, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSingleSegmentCompatible, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@esm/index.mjs'; +import { isAllowedDataTypeCast, isBufferLengthCompatible, isBufferLengthCompatibleShape, isCastingMode, isColumnMajor, isColumnMajorContiguous, isComplexFloatingPointDataType, isContiguous, isDataType, isFloatingPointDataType, isIndexMode, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isOrder, isReadOnly, isRealDataType, isRealFloatingPointDataType, isRowMajor, isRowMajorContiguous, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSingleSegmentCompatible, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@v0.2.1-esm/index.mjs'; ``` #### ns @@ -113,7 +113,7 @@ var o = ns; - - - - From 4ccda2d2c3640e8fd89cbebc7cece08ad21866fb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 1 Mar 2024 14:11:42 +0000 Subject: [PATCH 115/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 ---- .github/workflows/publish.yml | 249 -- .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 132 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 229 - .npmrc | 28 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 93 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 -- package.json | 100 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4895 insertions(+), 3775 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index f68ed15..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-03-01T06:05:05.650Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index 9106b5d..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA corresponding to v2.0.0 - uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -146,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -211,55 +208,55 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..bc9a590 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 40a6ae4..b7b617a 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,78 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.1", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.1", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.1", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.1", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.1", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.1", - "@stdlib/array-cartesian-square": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/math-base-special-abs": "^0.2.1", - "@stdlib/math-base-special-floor": "^0.2.1", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.1", - "@stdlib/ndarray-base-iteration-order": "^0.2.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.1", - "@stdlib/ndarray-base-numel": "^0.2.1", - "@stdlib/ndarray-base-shape2strides": "^0.2.1", - "@stdlib/ndarray-base-strides2offset": "^0.2.1", - "@stdlib/ndarray-casting-modes": "^0.2.1", - "@stdlib/ndarray-dtypes": "^0.2.1", - "@stdlib/ndarray-index-modes": "^0.2.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.2.1", - "@stdlib/ndarray-orders": "^0.2.1", - "@stdlib/ndarray-safe-casts": "^0.2.1", - "@stdlib/ndarray-same-kind-casts": "^0.2.1", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -136,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..d92e514 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From f5e809f1718bf53cb2f43dcf95a1a1e077e82ec4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 07:42:47 +0000 Subject: [PATCH 116/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 97cffe4..d77073a 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.1", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.1", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" + "@stdlib/utils-define-read-only-property": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.1", @@ -135,4 +136,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 96d699aa5a40913441b5138f8cf16ffbfd48d110 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 13:14:21 +0000 Subject: [PATCH 117/183] Remove files --- index.d.ts | 839 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5686 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 6b5270e..0000000 --- a/index.d.ts +++ /dev/null @@ -1,839 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index bc9a590..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index d92e514..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 8b0055e291f3eb4ddc79d3e65e5f722825f9475b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 1 Apr 2024 13:14:47 +0000 Subject: [PATCH 118/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 ---- .github/workflows/publish.yml | 249 -- .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 132 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 93 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 -- package.json | 100 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4895 insertions(+), 3778 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 401210e..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-04-01T05:21:09.179Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index ec90164..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -146,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -211,55 +208,55 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..bc9a590 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index d77073a..b7b617a 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,78 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.1", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.1", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.1", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.1", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.1", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.1", - "@stdlib/array-cartesian-square": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/math-base-special-abs": "^0.2.1", - "@stdlib/math-base-special-floor": "^0.2.2", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.1", - "@stdlib/ndarray-base-iteration-order": "^0.2.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.1", - "@stdlib/ndarray-base-numel": "^0.2.1", - "@stdlib/ndarray-base-shape2strides": "^0.2.1", - "@stdlib/ndarray-base-strides2offset": "^0.2.1", - "@stdlib/ndarray-casting-modes": "^0.2.1", - "@stdlib/ndarray-dtypes": "^0.2.1", - "@stdlib/ndarray-index-modes": "^0.2.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.2.1", - "@stdlib/ndarray-orders": "^0.2.1", - "@stdlib/ndarray-safe-casts": "^0.2.1", - "@stdlib/ndarray-same-kind-casts": "^0.2.1", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -136,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..d92e514 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 6b515bd62508b54ed60c9fbf25477cbb9f4ff121 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 03:56:05 +0000 Subject: [PATCH 119/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 97cffe4..d77073a 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.1", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.1", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1" + "@stdlib/utils-define-read-only-property": "^0.2.1", + "@stdlib/error-tools-fmtprodmsg": "^0.2.1" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.1", @@ -135,4 +136,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From be177b527a2ac5f756172e23cb719e39e47d4313 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 09:21:44 +0000 Subject: [PATCH 120/183] Remove files --- index.d.ts | 839 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5686 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 6b5270e..0000000 --- a/index.d.ts +++ /dev/null @@ -1,839 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index bc9a590..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index d92e514..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 58bbde562d9d0ee8531ee6df5cbc7c5f78b12b36 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 12 Apr 2024 09:22:06 +0000 Subject: [PATCH 121/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 49 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 797 ---- .github/workflows/publish.yml | 249 -- .github/workflows/test.yml | 100 - .github/workflows/test_bundles.yml | 189 - .github/workflows/test_coverage.yml | 134 - .github/workflows/test_install.yml | 86 - .gitignore | 188 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 5 - CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 93 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 -- package.json | 100 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4895 insertions(+), 3779 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 10a16e6..0000000 --- a/.gitattributes +++ /dev/null @@ -1,49 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false - -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index ec90164..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,797 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - steps: ${{ toJson(steps) }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure git: - - name: 'Configure git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -146,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -211,55 +208,55 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..bc9a590 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index d77073a..b7b617a 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.2.1", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,78 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.1", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.1", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.1", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.1", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.1.1", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-order": "^0.2.1", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.1", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.1.1", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.1", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.1", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.1", - "@stdlib/utils-define-read-only-property": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.1" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.1", - "@stdlib/array-cartesian-square": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.1", - "@stdlib/math-base-special-abs": "^0.2.1", - "@stdlib/math-base-special-floor": "^0.2.2", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.1", - "@stdlib/ndarray-base-iteration-order": "^0.2.1", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.1", - "@stdlib/ndarray-base-numel": "^0.2.1", - "@stdlib/ndarray-base-shape2strides": "^0.2.1", - "@stdlib/ndarray-base-strides2offset": "^0.2.1", - "@stdlib/ndarray-casting-modes": "^0.2.1", - "@stdlib/ndarray-dtypes": "^0.2.1", - "@stdlib/ndarray-index-modes": "^0.2.1", - "@stdlib/ndarray-mostly-safe-casts": "^0.2.1", - "@stdlib/ndarray-orders": "^0.2.1", - "@stdlib/ndarray-safe-casts": "^0.2.1", - "@stdlib/ndarray-same-kind-casts": "^0.2.1", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.1", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.1" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -136,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..d92e514 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 0c217aab82aa0aa8fc996fcb861e017576f6c94c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 03:28:59 +0000 Subject: [PATCH 122/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9ae4a5d..bea78dd 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" + "@stdlib/utils-define-read-only-property": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.2", @@ -135,4 +136,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 80e4a981679e5e37d85e1baebab19b29df2a6f37 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 03:49:08 +0000 Subject: [PATCH 123/183] Remove files --- index.d.ts | 839 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5686 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 6b5270e..0000000 --- a/index.d.ts +++ /dev/null @@ -1,839 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index bc9a590..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.1-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.1-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.1-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.1-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.1-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.1-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.1.0-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.1-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.1-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.1-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.1-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.1-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.1.0-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.1-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.1-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index d92e514..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 6c85f7cde60b0b48d175b5bd1a427a8c00a2fdc6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 03:49:26 +0000 Subject: [PATCH 124/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1652 ------- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 93 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 -- package.json | 100 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4895 insertions(+), 5439 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -146,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -211,55 +208,55 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..eb25e23 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.1-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.1-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.1-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.1-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.1-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.1-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.1-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.1-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.1-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index bea78dd..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,78 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.1", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.1", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-cartesian-square": "^0.2.1", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -136,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..1ad66ae --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 730bf176d253a2d746e4eb4d6c0a800bd2c1ee4d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 29 Jul 2024 03:54:10 +0000 Subject: [PATCH 125/183] Update README.md for ESM bundle v0.3.0 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2925463..ed30ae9 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ limitations under the License. ## Usage ```javascript -import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@esm/index.mjs'; +import ns from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@v0.3.0-esm/index.mjs'; ``` You can also import the following named exports from the package: ```javascript -import { isAllowedDataTypeCast, isBufferLengthCompatible, isBufferLengthCompatibleShape, isCastingMode, isColumnMajor, isColumnMajorContiguous, isComplexFloatingPointDataType, isContiguous, isDataType, isFloatingPointDataType, isIndexMode, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isOrder, isReadOnly, isRealDataType, isRealFloatingPointDataType, isRowMajor, isRowMajorContiguous, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSingleSegmentCompatible, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@esm/index.mjs'; +import { isAllowedDataTypeCast, isBufferLengthCompatible, isBufferLengthCompatibleShape, isCastingMode, isColumnMajor, isColumnMajorContiguous, isComplexFloatingPointDataType, isContiguous, isDataType, isFloatingPointDataType, isIndexMode, isIntegerDataType, isMostlySafeDataTypeCast, isNumericDataType, isOrder, isReadOnly, isRealDataType, isRealFloatingPointDataType, isRowMajor, isRowMajorContiguous, isSafeDataTypeCast, isSameKindDataTypeCast, isSignedIntegerDataType, isSingleSegmentCompatible, isUnsignedIntegerDataType } from 'https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert@v0.3.0-esm/index.mjs'; ``` #### ns @@ -113,7 +113,7 @@ var o = ns; - - - - From 7515d79f7e65183a80dc480f3388ab162cf44d3c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 1 Aug 2024 13:30:26 +0000 Subject: [PATCH 129/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/.keepalive | 1 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 288 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 93 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 267 -- package.json | 100 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4895 insertions(+), 4076 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/.keepalive delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 2fa7b4f..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-08-01T06:14:59.084Z diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -146,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -211,55 +208,55 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 46edfc7..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index e19cb48..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..012073c --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..29178d0 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 17031ed..0000000 --- a/lib/index.js +++ /dev/null @@ -1,267 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index cab7055..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,78 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -136,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..213c577 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 6365f6ae108f8ad5c21971170f0c76b7cfe4ea0f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 9 Sep 2024 01:27:08 +0000 Subject: [PATCH 130/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4770204..4d78ab7 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" + "@stdlib/utils-define-read-only-property": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.2", @@ -138,4 +139,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 5c8e215de1c0e40f797a2dd7c1ae2073061e7e06 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 9 Sep 2024 01:27:35 +0000 Subject: [PATCH 131/183] Remove files --- index.d.ts | 839 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5686 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 6b5270e..0000000 --- a/index.d.ts +++ /dev/null @@ -1,839 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 012073c..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var S={};s(S,"isAllowedDataTypeCast",e),s(S,"isBufferLengthCompatible",t),s(S,"isBufferLengthCompatibleShape",a),s(S,"isCastingMode",r),s(S,"isColumnMajor",i),s(S,"isColumnMajorContiguous",d),s(S,"isComplexFloatingPointDataType",n),s(S,"isContiguous",m),s(S,"isDataType",o),s(S,"isFloatingPointDataType",l),s(S,"isIndexMode",p),s(S,"isIntegerDataType",j),s(S,"isMostlySafeDataTypeCast",b),s(S,"isNumericDataType",g),s(S,"isOrder",h),s(S,"isReadOnly",y),s(S,"isRealDataType",f),s(S,"isRealFloatingPointDataType",v),s(S,"isRowMajor",x),s(S,"isRowMajorContiguous",c),s(S,"isSafeDataTypeCast",u),s(S,"isSameKindDataTypeCast",C),s(S,"isSignedIntegerDataType",D),s(S,"isSingleSegmentCompatible",T),s(S,"isUnsignedIntegerDataType",M);export{S as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 29178d0..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","isAllowedDataTypeCast","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;4gNAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,wBAAAE,GAUAD,EAAAD,EAAA,2BAAAG,GAUAF,EAAAD,EAAA,gCAAAI,GAUAH,EAAAD,EAAA,gBAAAK,GAUAJ,EAAAD,EAAA,gBAAAM,GAUAL,EAAAD,EAAA,0BAAAO,GAUAN,EAAAD,EAAA,iCAAAQ,GAUAP,EAAAD,EAAA,eAAAS,GAUAR,EAAAD,EAAA,aAAAU,GAUAT,EAAAD,EAAA,0BAAAW,GAUAV,EAAAD,EAAA,cAAAY,GAUAX,EAAAD,EAAA,oBAAAa,GAUAZ,EAAAD,EAAA,2BAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,UAAAgB,GAUAf,EAAAD,EAAA,aAAAiB,GAUAhB,EAAAD,EAAA,iBAAAkB,GAUAjB,EAAAD,EAAA,8BAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,uBAAAqB,GAUApB,EAAAD,EAAA,qBAAAsB,GAUArB,EAAAD,EAAA,yBAAAuB,GAUAtB,EAAAD,EAAA,0BAAAwB,GAUAvB,EAAAD,EAAA,4BAAAyB,GAUAxB,EAAAD,EAAA,4BAAA0B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 213c577..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From ea0225a9a3c61a7aeddab0c8820b904041b8911b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 9 Sep 2024 01:27:59 +0000 Subject: [PATCH 132/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 ---- .github/workflows/publish.yml | 252 -- .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1341 ------ CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 --- README.md | 93 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 285 -- package.json | 103 +- stats.html | 4842 +++++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 39 files changed, 4895 insertions(+), 5149 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -146,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -211,55 +208,55 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 583cbef..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index ebe5c07..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..fe092c5 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var R={};s(R,"hasEqualShape",e),s(R,"isAllowedDataTypeCast",t),s(R,"isBooleanDataType",a),s(R,"isBufferLengthCompatible",r),s(R,"isBufferLengthCompatibleShape",i),s(R,"isCastingMode",d),s(R,"isColumnMajor",n),s(R,"isColumnMajorContiguous",m),s(R,"isComplexFloatingPointDataType",o),s(R,"isContiguous",l),s(R,"isDataType",p),s(R,"isFloatingPointDataType",j),s(R,"isIndexMode",h),s(R,"isIntegerDataType",b),s(R,"isMostlySafeDataTypeCast",y),s(R,"isNumericDataType",g),s(R,"isOrder",f),s(R,"isReadOnly",v),s(R,"isRealDataType",x),s(R,"isRealFloatingPointDataType",c),s(R,"isRowMajor",u),s(R,"isRowMajorContiguous",C),s(R,"isSafeDataTypeCast",D),s(R,"isSameKindDataTypeCast",T),s(R,"isSignedIntegerDataType",S),s(R,"isSingleSegmentCompatible",M),s(R,"isUnsignedIntegerDataType",w);export{R as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..be72c9e --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;k/NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,0BAAAa,GAUAZ,EAAAD,EAAA,cAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,2BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,UAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,aAAAsB,GAUArB,EAAAD,EAAA,uBAAAuB,GAUAtB,EAAAD,EAAA,qBAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,0BAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B,GAUA1B,EAAAD,EAAA,4BAAA4B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 962ea78..0000000 --- a/lib/index.js +++ /dev/null @@ -1,285 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d78ab7..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,81 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -139,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..dda9693 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 17534568857600875a20ce42a8999483c3fe0257 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 20 Nov 2024 03:29:43 +0000 Subject: [PATCH 133/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 32ed405..80cbdce 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" + "@stdlib/utils-define-read-only-property": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.2", @@ -139,4 +140,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 75a90e8d10f64de3b74b70b28d6b5ff9e26e7547 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 20 Nov 2024 03:30:21 +0000 Subject: [PATCH 134/183] Remove files --- index.d.ts | 839 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5686 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 6b5270e..0000000 --- a/index.d.ts +++ /dev/null @@ -1,839 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index fe092c5..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var R={};s(R,"hasEqualShape",e),s(R,"isAllowedDataTypeCast",t),s(R,"isBooleanDataType",a),s(R,"isBufferLengthCompatible",r),s(R,"isBufferLengthCompatibleShape",i),s(R,"isCastingMode",d),s(R,"isColumnMajor",n),s(R,"isColumnMajorContiguous",m),s(R,"isComplexFloatingPointDataType",o),s(R,"isContiguous",l),s(R,"isDataType",p),s(R,"isFloatingPointDataType",j),s(R,"isIndexMode",h),s(R,"isIntegerDataType",b),s(R,"isMostlySafeDataTypeCast",y),s(R,"isNumericDataType",g),s(R,"isOrder",f),s(R,"isReadOnly",v),s(R,"isRealDataType",x),s(R,"isRealFloatingPointDataType",c),s(R,"isRowMajor",u),s(R,"isRowMajorContiguous",C),s(R,"isSafeDataTypeCast",D),s(R,"isSameKindDataTypeCast",T),s(R,"isSignedIntegerDataType",S),s(R,"isSingleSegmentCompatible",M),s(R,"isUnsignedIntegerDataType",w);export{R as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index be72c9e..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;k/NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,0BAAAa,GAUAZ,EAAAD,EAAA,cAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,2BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,UAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,aAAAsB,GAUArB,EAAAD,EAAA,uBAAAuB,GAUAtB,EAAAD,EAAA,qBAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,0BAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B,GAUA1B,EAAAD,EAAA,4BAAA4B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index dda9693..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 4405468aae0ee16a4c118485c51449a63d4a4fa9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 20 Nov 2024 03:31:36 +0000 Subject: [PATCH 135/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1369 ----- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 93 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 285 -- package.json | 104 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4895 insertions(+), 5283 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -146,7 +143,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -211,55 +208,55 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 583cbef..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index ebe5c07..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..fe092c5 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var R={};s(R,"hasEqualShape",e),s(R,"isAllowedDataTypeCast",t),s(R,"isBooleanDataType",a),s(R,"isBufferLengthCompatible",r),s(R,"isBufferLengthCompatibleShape",i),s(R,"isCastingMode",d),s(R,"isColumnMajor",n),s(R,"isColumnMajorContiguous",m),s(R,"isComplexFloatingPointDataType",o),s(R,"isContiguous",l),s(R,"isDataType",p),s(R,"isFloatingPointDataType",j),s(R,"isIndexMode",h),s(R,"isIntegerDataType",b),s(R,"isMostlySafeDataTypeCast",y),s(R,"isNumericDataType",g),s(R,"isOrder",f),s(R,"isReadOnly",v),s(R,"isRealDataType",x),s(R,"isRealFloatingPointDataType",c),s(R,"isRowMajor",u),s(R,"isRowMajorContiguous",C),s(R,"isSafeDataTypeCast",D),s(R,"isSameKindDataTypeCast",T),s(R,"isSignedIntegerDataType",S),s(R,"isSingleSegmentCompatible",M),s(R,"isUnsignedIntegerDataType",w);export{R as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..be72c9e --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;k/NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,0BAAAa,GAUAZ,EAAAD,EAAA,cAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,2BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,UAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,aAAAsB,GAUArB,EAAAD,EAAA,uBAAAuB,GAUAtB,EAAAD,EAAA,qBAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,0BAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B,GAUA1B,EAAAD,EAAA,4BAAA4B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 962ea78..0000000 --- a/lib/index.js +++ /dev/null @@ -1,285 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 80cbdce..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,82 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -140,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..dda9693 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 1036dcc4eff2f9f8dd8ea64249268add81b26767 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 21 Nov 2024 03:26:03 +0000 Subject: [PATCH 136/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 32ed405..80cbdce 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" + "@stdlib/utils-define-read-only-property": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.2", @@ -139,4 +140,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From c20c6bff1938448a9e382c96021f8f3463261ef1 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 21 Nov 2024 03:34:03 +0000 Subject: [PATCH 137/183] Remove files --- index.d.ts | 907 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5754 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 6f5aa82..0000000 --- a/index.d.ts +++ /dev/null @@ -1,907 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index fe092c5..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var R={};s(R,"hasEqualShape",e),s(R,"isAllowedDataTypeCast",t),s(R,"isBooleanDataType",a),s(R,"isBufferLengthCompatible",r),s(R,"isBufferLengthCompatibleShape",i),s(R,"isCastingMode",d),s(R,"isColumnMajor",n),s(R,"isColumnMajorContiguous",m),s(R,"isComplexFloatingPointDataType",o),s(R,"isContiguous",l),s(R,"isDataType",p),s(R,"isFloatingPointDataType",j),s(R,"isIndexMode",h),s(R,"isIntegerDataType",b),s(R,"isMostlySafeDataTypeCast",y),s(R,"isNumericDataType",g),s(R,"isOrder",f),s(R,"isReadOnly",v),s(R,"isRealDataType",x),s(R,"isRealFloatingPointDataType",c),s(R,"isRowMajor",u),s(R,"isRowMajorContiguous",C),s(R,"isSafeDataTypeCast",D),s(R,"isSameKindDataTypeCast",T),s(R,"isSignedIntegerDataType",S),s(R,"isSingleSegmentCompatible",M),s(R,"isUnsignedIntegerDataType",w);export{R as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index be72c9e..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;k/NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,0BAAAa,GAUAZ,EAAAD,EAAA,cAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,2BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,UAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,aAAAsB,GAUArB,EAAAD,EAAA,uBAAAuB,GAUAtB,EAAAD,EAAA,qBAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,0BAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B,GAUA1B,EAAAD,EAAA,4BAAA4B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index dda9693..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 9bfbc11df9a6cabdbf36ef5715553e6aadc9c7aa Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 21 Nov 2024 03:35:10 +0000 Subject: [PATCH 138/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1370 ----- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 97 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 285 -- package.json | 104 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4897 insertions(+), 5286 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 60d743f..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = false - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -148,7 +145,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -213,59 +210,59 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 583cbef..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index ebe5c07..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..fe092c5 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var R={};s(R,"hasEqualShape",e),s(R,"isAllowedDataTypeCast",t),s(R,"isBooleanDataType",a),s(R,"isBufferLengthCompatible",r),s(R,"isBufferLengthCompatibleShape",i),s(R,"isCastingMode",d),s(R,"isColumnMajor",n),s(R,"isColumnMajorContiguous",m),s(R,"isComplexFloatingPointDataType",o),s(R,"isContiguous",l),s(R,"isDataType",p),s(R,"isFloatingPointDataType",j),s(R,"isIndexMode",h),s(R,"isIntegerDataType",b),s(R,"isMostlySafeDataTypeCast",y),s(R,"isNumericDataType",g),s(R,"isOrder",f),s(R,"isReadOnly",v),s(R,"isRealDataType",x),s(R,"isRealFloatingPointDataType",c),s(R,"isRowMajor",u),s(R,"isRowMajorContiguous",C),s(R,"isSafeDataTypeCast",D),s(R,"isSameKindDataTypeCast",T),s(R,"isSignedIntegerDataType",S),s(R,"isSingleSegmentCompatible",M),s(R,"isUnsignedIntegerDataType",w);export{R as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..be72c9e --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;k/NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,0BAAAa,GAUAZ,EAAAD,EAAA,cAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,2BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,UAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,aAAAsB,GAUArB,EAAAD,EAAA,uBAAAuB,GAUAtB,EAAAD,EAAA,qBAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,0BAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B,GAUA1B,EAAAD,EAAA,4BAAA4B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 962ea78..0000000 --- a/lib/index.js +++ /dev/null @@ -1,285 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 80cbdce..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,82 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -140,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..dda9693 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 08bea056170f33325b6f70954bf9eb3b1aa95e51 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 11 Jan 2025 22:54:42 +0000 Subject: [PATCH 139/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 58e93fe..55fd4cb 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" + "@stdlib/utils-define-read-only-property": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.2", @@ -141,4 +142,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From ede82f4ed4a3c5d1789970bec9abbbd07da0a603 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 11 Jan 2025 22:57:18 +0000 Subject: [PATCH 140/183] Remove files --- index.d.ts | 907 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5754 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 6f5aa82..0000000 --- a/index.d.ts +++ /dev/null @@ -1,907 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index fe092c5..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var R={};s(R,"hasEqualShape",e),s(R,"isAllowedDataTypeCast",t),s(R,"isBooleanDataType",a),s(R,"isBufferLengthCompatible",r),s(R,"isBufferLengthCompatibleShape",i),s(R,"isCastingMode",d),s(R,"isColumnMajor",n),s(R,"isColumnMajorContiguous",m),s(R,"isComplexFloatingPointDataType",o),s(R,"isContiguous",l),s(R,"isDataType",p),s(R,"isFloatingPointDataType",j),s(R,"isIndexMode",h),s(R,"isIntegerDataType",b),s(R,"isMostlySafeDataTypeCast",y),s(R,"isNumericDataType",g),s(R,"isOrder",f),s(R,"isReadOnly",v),s(R,"isRealDataType",x),s(R,"isRealFloatingPointDataType",c),s(R,"isRowMajor",u),s(R,"isRowMajorContiguous",C),s(R,"isSafeDataTypeCast",D),s(R,"isSameKindDataTypeCast",T),s(R,"isSignedIntegerDataType",S),s(R,"isSingleSegmentCompatible",M),s(R,"isUnsignedIntegerDataType",w);export{R as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index be72c9e..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;k/NAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,iCAAAU,GAUAT,EAAAD,EAAA,eAAAW,GAUAV,EAAAD,EAAA,aAAAY,GAUAX,EAAAD,EAAA,0BAAAa,GAUAZ,EAAAD,EAAA,cAAAc,GAUAb,EAAAD,EAAA,oBAAAe,GAUAd,EAAAD,EAAA,2BAAAgB,GAUAf,EAAAD,EAAA,oBAAAiB,GAUAhB,EAAAD,EAAA,UAAAkB,GAUAjB,EAAAD,EAAA,aAAAmB,GAUAlB,EAAAD,EAAA,iBAAAoB,GAUAnB,EAAAD,EAAA,8BAAAqB,GAUApB,EAAAD,EAAA,aAAAsB,GAUArB,EAAAD,EAAA,uBAAAuB,GAUAtB,EAAAD,EAAA,qBAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,0BAAA0B,GAUAzB,EAAAD,EAAA,4BAAA2B,GAUA1B,EAAAD,EAAA,4BAAA4B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index dda9693..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 0d1b574619f9385994f1bae78ecc166e2e378170 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 11 Jan 2025 22:58:24 +0000 Subject: [PATCH 141/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1422 ----- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 97 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 303 -- package.json | 106 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4897 insertions(+), 5358 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0779e8a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -148,7 +145,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -213,59 +210,59 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index f23f850..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));r(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));r(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));r(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));r(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));r(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));r(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));r(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));r(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));r(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));r(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));r(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));r(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));r(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));r(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));r(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));r(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));r(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));r(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 0007658..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..e709d27 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var B={};s(B,"hasEqualShape",e),s(B,"isAllowedDataTypeCast",t),s(B,"isBooleanDataType",a),s(B,"isBufferLengthCompatible",r),s(B,"isBufferLengthCompatibleShape",i),s(B,"isCastingMode",d),s(B,"isColumnMajor",n),s(B,"isColumnMajorContiguous",m),s(B,"isColumnMajorString",o),s(B,"isComplexFloatingPointDataType",l),s(B,"isContiguous",p),s(B,"isDataType",j),s(B,"isFloatingPointDataType",h),s(B,"isIndexMode",b),s(B,"isIntegerDataType",g),s(B,"isMostlySafeDataTypeCast",y),s(B,"isNumericDataType",f),s(B,"isOrder",v),s(B,"isReadOnly",x),s(B,"isRealDataType",c),s(B,"isRealFloatingPointDataType",u),s(B,"isRowMajor",C),s(B,"isRowMajorContiguous",D),s(B,"isRowMajorString",T),s(B,"isSafeDataTypeCast",S),s(B,"isSameKindDataTypeCast",M),s(B,"isSignedIntegerDataType",w),s(B,"isSingleSegmentCompatible",R),s(B,"isUnsignedIntegerDataType",I);export{B as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..6d35db1 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;29OAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,aAAAuB,GAUAtB,EAAAD,EAAA,uBAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,qBAAA0B,GAUAzB,EAAAD,EAAA,yBAAA2B,GAUA1B,EAAAD,EAAA,0BAAA4B,GAUA3B,EAAAD,EAAA,4BAAA6B,GAUA5B,EAAAD,EAAA,4BAAA8B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 9aa4892..0000000 --- a/lib/index.js +++ /dev/null @@ -1,303 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 55fd4cb..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,84 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -142,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..e3a55cb --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 6a9b3be689446718cb84d43dc3230da616a1b502 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Jan 2025 03:31:41 +0000 Subject: [PATCH 142/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 58e93fe..55fd4cb 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" + "@stdlib/utils-define-read-only-property": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.2", @@ -141,4 +142,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 38d59f2984390ef438b510d0da1f1c5f9ab76c52 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Jan 2025 03:34:09 +0000 Subject: [PATCH 143/183] Remove files --- index.d.ts | 907 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5754 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 6f5aa82..0000000 --- a/index.d.ts +++ /dev/null @@ -1,907 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index e709d27..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var B={};s(B,"hasEqualShape",e),s(B,"isAllowedDataTypeCast",t),s(B,"isBooleanDataType",a),s(B,"isBufferLengthCompatible",r),s(B,"isBufferLengthCompatibleShape",i),s(B,"isCastingMode",d),s(B,"isColumnMajor",n),s(B,"isColumnMajorContiguous",m),s(B,"isColumnMajorString",o),s(B,"isComplexFloatingPointDataType",l),s(B,"isContiguous",p),s(B,"isDataType",j),s(B,"isFloatingPointDataType",h),s(B,"isIndexMode",b),s(B,"isIntegerDataType",g),s(B,"isMostlySafeDataTypeCast",y),s(B,"isNumericDataType",f),s(B,"isOrder",v),s(B,"isReadOnly",x),s(B,"isRealDataType",c),s(B,"isRealFloatingPointDataType",u),s(B,"isRowMajor",C),s(B,"isRowMajorContiguous",D),s(B,"isRowMajorString",T),s(B,"isSafeDataTypeCast",S),s(B,"isSameKindDataTypeCast",M),s(B,"isSignedIntegerDataType",w),s(B,"isSingleSegmentCompatible",R),s(B,"isUnsignedIntegerDataType",I);export{B as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 6d35db1..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;29OAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,aAAAuB,GAUAtB,EAAAD,EAAA,uBAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,qBAAA0B,GAUAzB,EAAAD,EAAA,yBAAA2B,GAUA1B,EAAAD,EAAA,0BAAA4B,GAUA3B,EAAAD,EAAA,4BAAA6B,GAUA5B,EAAAD,EAAA,4BAAA8B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index e3a55cb..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From e9963d78392ef0fe4b6b14eecb4e52c57e6408d8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 12 Jan 2025 03:34:59 +0000 Subject: [PATCH 144/183] Auto-generated commit --- .editorconfig | 181 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 190 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1423 ----- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 101 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 303 -- package.json | 106 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4899 insertions(+), 5361 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0779e8a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,181 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 -insert_final_newline = false - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1b473c1..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -150,7 +147,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -215,63 +212,63 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index f23f850..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));r(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));r(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));r(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));r(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));r(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));r(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));r(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));r(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));r(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));r(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));r(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));r(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));r(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));r(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));r(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));r(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));r(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));r(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 0007658..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..e709d27 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var B={};s(B,"hasEqualShape",e),s(B,"isAllowedDataTypeCast",t),s(B,"isBooleanDataType",a),s(B,"isBufferLengthCompatible",r),s(B,"isBufferLengthCompatibleShape",i),s(B,"isCastingMode",d),s(B,"isColumnMajor",n),s(B,"isColumnMajorContiguous",m),s(B,"isColumnMajorString",o),s(B,"isComplexFloatingPointDataType",l),s(B,"isContiguous",p),s(B,"isDataType",j),s(B,"isFloatingPointDataType",h),s(B,"isIndexMode",b),s(B,"isIntegerDataType",g),s(B,"isMostlySafeDataTypeCast",y),s(B,"isNumericDataType",f),s(B,"isOrder",v),s(B,"isReadOnly",x),s(B,"isRealDataType",c),s(B,"isRealFloatingPointDataType",u),s(B,"isRowMajor",C),s(B,"isRowMajorContiguous",D),s(B,"isRowMajorString",T),s(B,"isSafeDataTypeCast",S),s(B,"isSameKindDataTypeCast",M),s(B,"isSignedIntegerDataType",w),s(B,"isSingleSegmentCompatible",R),s(B,"isUnsignedIntegerDataType",I);export{B as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..6d35db1 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;29OAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,aAAAuB,GAUAtB,EAAAD,EAAA,uBAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,qBAAA0B,GAUAzB,EAAAD,EAAA,yBAAA2B,GAUA1B,EAAAD,EAAA,0BAAA4B,GAUA3B,EAAAD,EAAA,4BAAA6B,GAUA5B,EAAAD,EAAA,4BAAA8B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 9aa4892..0000000 --- a/lib/index.js +++ /dev/null @@ -1,303 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 55fd4cb..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,84 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -142,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..e3a55cb --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 44564f0eb0362a99931ad2d1d7a83be92e4dabe9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Feb 2025 10:49:22 +0000 Subject: [PATCH 145/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bf313b1..5e12ed6 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" + "@stdlib/utils-define-read-only-property": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.2", @@ -143,4 +144,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From c06aed3da37e9569173ade8b92516d42c40287cd Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Feb 2025 10:50:29 +0000 Subject: [PATCH 146/183] Remove files --- index.d.ts | 907 --------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5754 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 6f5aa82..0000000 --- a/index.d.ts +++ /dev/null @@ -1,907 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index e709d27..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var B={};s(B,"hasEqualShape",e),s(B,"isAllowedDataTypeCast",t),s(B,"isBooleanDataType",a),s(B,"isBufferLengthCompatible",r),s(B,"isBufferLengthCompatibleShape",i),s(B,"isCastingMode",d),s(B,"isColumnMajor",n),s(B,"isColumnMajorContiguous",m),s(B,"isColumnMajorString",o),s(B,"isComplexFloatingPointDataType",l),s(B,"isContiguous",p),s(B,"isDataType",j),s(B,"isFloatingPointDataType",h),s(B,"isIndexMode",b),s(B,"isIntegerDataType",g),s(B,"isMostlySafeDataTypeCast",y),s(B,"isNumericDataType",f),s(B,"isOrder",v),s(B,"isReadOnly",x),s(B,"isRealDataType",c),s(B,"isRealFloatingPointDataType",u),s(B,"isRowMajor",C),s(B,"isRowMajorContiguous",D),s(B,"isRowMajorString",T),s(B,"isSafeDataTypeCast",S),s(B,"isSameKindDataTypeCast",M),s(B,"isSignedIntegerDataType",w),s(B,"isSingleSegmentCompatible",R),s(B,"isUnsignedIntegerDataType",I);export{B as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 6d35db1..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;29OAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,aAAAoB,GAUAnB,EAAAD,EAAA,iBAAAqB,GAUApB,EAAAD,EAAA,8BAAAsB,GAUArB,EAAAD,EAAA,aAAAuB,GAUAtB,EAAAD,EAAA,uBAAAwB,GAUAvB,EAAAD,EAAA,mBAAAyB,GAUAxB,EAAAD,EAAA,qBAAA0B,GAUAzB,EAAAD,EAAA,yBAAA2B,GAUA1B,EAAAD,EAAA,0BAAA4B,GAUA3B,EAAAD,EAAA,4BAAA6B,GAUA5B,EAAAD,EAAA,4BAAA8B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index e3a55cb..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 45f680f17b00f949fe22012993397e2aa1205f7d Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Feb 2025 10:51:22 +0000 Subject: [PATCH 147/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1451 ------ CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 101 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 312 -- package.json | 108 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4899 insertions(+), 5403 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -150,7 +147,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -215,63 +212,63 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 7f5446c..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 7ef4a8b..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..ce720ea --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var B={};s(B,"hasEqualShape",e),s(B,"isAllowedDataTypeCast",t),s(B,"isBooleanDataType",a),s(B,"isBufferLengthCompatible",r),s(B,"isBufferLengthCompatibleShape",i),s(B,"isCastingMode",d),s(B,"isColumnMajor",n),s(B,"isColumnMajorContiguous",m),s(B,"isColumnMajorString",o),s(B,"isComplexFloatingPointDataType",l),s(B,"isContiguous",p),s(B,"isDataType",j),s(B,"isFloatingPointDataType",h),s(B,"isIndexMode",b),s(B,"isIntegerDataType",y),s(B,"isMostlySafeDataTypeCast",g),s(B,"isNumericDataType",f),s(B,"isOrder",v),s(B,"isOutputDataTypePolicy",x),s(B,"isReadOnly",c),s(B,"isRealDataType",u),s(B,"isRealFloatingPointDataType",C),s(B,"isRowMajor",D),s(B,"isRowMajorContiguous",T),s(B,"isRowMajorString",S),s(B,"isSafeDataTypeCast",M),s(B,"isSameKindDataTypeCast",w),s(B,"isSignedIntegerDataType",R),s(B,"isSingleSegmentCompatible",I),s(B,"isUnsignedIntegerDataType",P);export{B as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..8072b59 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;+tPAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,0BAAA6B,GAUA5B,EAAAD,EAAA,4BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index b9ce585..0000000 --- a/lib/index.js +++ /dev/null @@ -1,312 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 5e12ed6..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,86 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -144,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8364b2d --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From e8efe240d199b897b6cb3e43b623fd457745b230 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 25 Feb 2025 03:21:24 +0000 Subject: [PATCH 148/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bf313b1..5e12ed6 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" + "@stdlib/utils-define-read-only-property": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.2", @@ -143,4 +144,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From 00d51eaa8eb26f7e01c34ccc0e4b67e9c03e32a5 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 25 Feb 2025 03:29:56 +0000 Subject: [PATCH 149/183] Remove files --- index.d.ts | 945 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5792 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index d1fc933..0000000 --- a/index.d.ts +++ /dev/null @@ -1,945 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index ce720ea..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var B={};s(B,"hasEqualShape",e),s(B,"isAllowedDataTypeCast",t),s(B,"isBooleanDataType",a),s(B,"isBufferLengthCompatible",r),s(B,"isBufferLengthCompatibleShape",i),s(B,"isCastingMode",d),s(B,"isColumnMajor",n),s(B,"isColumnMajorContiguous",m),s(B,"isColumnMajorString",o),s(B,"isComplexFloatingPointDataType",l),s(B,"isContiguous",p),s(B,"isDataType",j),s(B,"isFloatingPointDataType",h),s(B,"isIndexMode",b),s(B,"isIntegerDataType",y),s(B,"isMostlySafeDataTypeCast",g),s(B,"isNumericDataType",f),s(B,"isOrder",v),s(B,"isOutputDataTypePolicy",x),s(B,"isReadOnly",c),s(B,"isRealDataType",u),s(B,"isRealFloatingPointDataType",C),s(B,"isRowMajor",D),s(B,"isRowMajorContiguous",T),s(B,"isRowMajorString",S),s(B,"isSafeDataTypeCast",M),s(B,"isSameKindDataTypeCast",w),s(B,"isSignedIntegerDataType",R),s(B,"isSingleSegmentCompatible",I),s(B,"isUnsignedIntegerDataType",P);export{B as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 8072b59..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;+tPAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,0BAAA6B,GAUA5B,EAAAD,EAAA,4BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8364b2d..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 610b94a5b165e901dfb68fddeb3da7b8c14076c6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 25 Feb 2025 03:31:00 +0000 Subject: [PATCH 150/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1452 ------ CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 312 -- package.json | 108 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4900 insertions(+), 5405 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -151,7 +148,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -216,65 +213,65 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 7f5446c..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 7ef4a8b..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..ce720ea --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var B={};s(B,"hasEqualShape",e),s(B,"isAllowedDataTypeCast",t),s(B,"isBooleanDataType",a),s(B,"isBufferLengthCompatible",r),s(B,"isBufferLengthCompatibleShape",i),s(B,"isCastingMode",d),s(B,"isColumnMajor",n),s(B,"isColumnMajorContiguous",m),s(B,"isColumnMajorString",o),s(B,"isComplexFloatingPointDataType",l),s(B,"isContiguous",p),s(B,"isDataType",j),s(B,"isFloatingPointDataType",h),s(B,"isIndexMode",b),s(B,"isIntegerDataType",y),s(B,"isMostlySafeDataTypeCast",g),s(B,"isNumericDataType",f),s(B,"isOrder",v),s(B,"isOutputDataTypePolicy",x),s(B,"isReadOnly",c),s(B,"isRealDataType",u),s(B,"isRealFloatingPointDataType",C),s(B,"isRowMajor",D),s(B,"isRowMajorContiguous",T),s(B,"isRowMajorString",S),s(B,"isSafeDataTypeCast",M),s(B,"isSameKindDataTypeCast",w),s(B,"isSignedIntegerDataType",R),s(B,"isSingleSegmentCompatible",I),s(B,"isUnsignedIntegerDataType",P);export{B as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..8072b59 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;+tPAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,0BAAA6B,GAUA5B,EAAAD,EAAA,4BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index b9ce585..0000000 --- a/lib/index.js +++ /dev/null @@ -1,312 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 5e12ed6..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,86 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -144,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8364b2d --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 63d68b0d6cd16743ed041c63c106342c87549321 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 27 Feb 2025 07:09:19 +0000 Subject: [PATCH 151/183] Transform error messages --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bf313b1..5e12ed6 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,8 @@ "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" + "@stdlib/utils-define-read-only-property": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2" }, "devDependencies": { "@stdlib/array-base-assert-contains": "^0.2.2", @@ -143,4 +144,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} +} \ No newline at end of file From fd2fb3db9090f64c877e02012ad2952a225cbfb7 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 27 Feb 2025 07:09:43 +0000 Subject: [PATCH 152/183] Remove files --- index.d.ts | 945 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5792 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index d1fc933..0000000 --- a/index.d.ts +++ /dev/null @@ -1,945 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index ce720ea..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var B={};s(B,"hasEqualShape",e),s(B,"isAllowedDataTypeCast",t),s(B,"isBooleanDataType",a),s(B,"isBufferLengthCompatible",r),s(B,"isBufferLengthCompatibleShape",i),s(B,"isCastingMode",d),s(B,"isColumnMajor",n),s(B,"isColumnMajorContiguous",m),s(B,"isColumnMajorString",o),s(B,"isComplexFloatingPointDataType",l),s(B,"isContiguous",p),s(B,"isDataType",j),s(B,"isFloatingPointDataType",h),s(B,"isIndexMode",b),s(B,"isIntegerDataType",y),s(B,"isMostlySafeDataTypeCast",g),s(B,"isNumericDataType",f),s(B,"isOrder",v),s(B,"isOutputDataTypePolicy",x),s(B,"isReadOnly",c),s(B,"isRealDataType",u),s(B,"isRealFloatingPointDataType",C),s(B,"isRowMajor",D),s(B,"isRowMajorContiguous",T),s(B,"isRowMajorString",S),s(B,"isSafeDataTypeCast",M),s(B,"isSameKindDataTypeCast",w),s(B,"isSignedIntegerDataType",R),s(B,"isSingleSegmentCompatible",I),s(B,"isUnsignedIntegerDataType",P);export{B as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 8072b59..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;+tPAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,0BAAA6B,GAUA5B,EAAAD,EAAA,4BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8364b2d..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 75d9e10218bcdae02b2b58e00a887569be279c59 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 27 Feb 2025 07:10:35 +0000 Subject: [PATCH 153/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1462 ------ CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 312 -- package.json | 108 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4900 insertions(+), 5415 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -151,7 +148,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -216,65 +213,65 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 7f5446c..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 7ef4a8b..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..ce720ea --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var B={};s(B,"hasEqualShape",e),s(B,"isAllowedDataTypeCast",t),s(B,"isBooleanDataType",a),s(B,"isBufferLengthCompatible",r),s(B,"isBufferLengthCompatibleShape",i),s(B,"isCastingMode",d),s(B,"isColumnMajor",n),s(B,"isColumnMajorContiguous",m),s(B,"isColumnMajorString",o),s(B,"isComplexFloatingPointDataType",l),s(B,"isContiguous",p),s(B,"isDataType",j),s(B,"isFloatingPointDataType",h),s(B,"isIndexMode",b),s(B,"isIntegerDataType",y),s(B,"isMostlySafeDataTypeCast",g),s(B,"isNumericDataType",f),s(B,"isOrder",v),s(B,"isOutputDataTypePolicy",x),s(B,"isReadOnly",c),s(B,"isRealDataType",u),s(B,"isRealFloatingPointDataType",C),s(B,"isRowMajor",D),s(B,"isRowMajorContiguous",T),s(B,"isRowMajorString",S),s(B,"isSafeDataTypeCast",M),s(B,"isSameKindDataTypeCast",w),s(B,"isSignedIntegerDataType",R),s(B,"isSingleSegmentCompatible",I),s(B,"isUnsignedIntegerDataType",P);export{B as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..8072b59 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;+tPAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,0BAAA6B,GAUA5B,EAAAD,EAAA,4BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index b9ce585..0000000 --- a/lib/index.js +++ /dev/null @@ -1,312 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 5e12ed6..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,86 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", @@ -144,4 +42,4 @@ "type": "opencollective", "url": "https://opencollective.com/stdlib" } -} \ No newline at end of file +} diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..8364b2d --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 4e4d388b3d9ff980e1a120088cf5b54e2b4e6063 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 23 Mar 2025 11:19:03 +0000 Subject: [PATCH 154/183] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index afbe837..19eafd8 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "@stdlib/ndarray-same-kind-casts": "^0.3.0", "@stdlib/random-base-discrete-uniform": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", From 16aa2f61fbddc15887d1b5646d95b01a5818b925 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 23 Mar 2025 11:19:27 +0000 Subject: [PATCH 155/183] Remove files --- index.d.ts | 967 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5814 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index d30366c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,967 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isOutputDataTypePolicy = require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an input value is a supported ndarray output data type policy. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray output data type policy - * - * @example - * var bool = ns.isOutputDataTypePolicy( 'boolean' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'real' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'numeric' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'foo' ); - * // returns false - */ - isOutputDataTypePolicy: typeof isOutputDataTypePolicy; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index ce720ea..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var B={};s(B,"hasEqualShape",e),s(B,"isAllowedDataTypeCast",t),s(B,"isBooleanDataType",a),s(B,"isBufferLengthCompatible",r),s(B,"isBufferLengthCompatibleShape",i),s(B,"isCastingMode",d),s(B,"isColumnMajor",n),s(B,"isColumnMajorContiguous",m),s(B,"isColumnMajorString",o),s(B,"isComplexFloatingPointDataType",l),s(B,"isContiguous",p),s(B,"isDataType",j),s(B,"isFloatingPointDataType",h),s(B,"isIndexMode",b),s(B,"isIntegerDataType",y),s(B,"isMostlySafeDataTypeCast",g),s(B,"isNumericDataType",f),s(B,"isOrder",v),s(B,"isOutputDataTypePolicy",x),s(B,"isReadOnly",c),s(B,"isRealDataType",u),s(B,"isRealFloatingPointDataType",C),s(B,"isRowMajor",D),s(B,"isRowMajorContiguous",T),s(B,"isRowMajorString",S),s(B,"isSafeDataTypeCast",M),s(B,"isSameKindDataTypeCast",w),s(B,"isSignedIntegerDataType",R),s(B,"isSingleSegmentCompatible",I),s(B,"isUnsignedIntegerDataType",P);export{B as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 8072b59..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;+tPAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,0BAAA6B,GAUA5B,EAAAD,EAAA,4BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 8364b2d..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 995d4e133e903035039d423ce53c1d3c720713be Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 23 Mar 2025 11:20:19 +0000 Subject: [PATCH 156/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1487 ------ CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 321 -- package.json | 114 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4899 insertions(+), 5456 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -151,7 +148,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -216,65 +213,65 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0be4c81..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isScalarMostlySafeCompatible",require('@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 593795c..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,+BAAgC,QAAS,8DAA+D,CAAE,EAS3HD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..b12afaf --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var F={};s(F,"hasEqualShape",e),s(F,"isAllowedDataTypeCast",t),s(F,"isBooleanDataType",a),s(F,"isBufferLengthCompatible",r),s(F,"isBufferLengthCompatibleShape",i),s(F,"isCastingMode",d),s(F,"isColumnMajor",n),s(F,"isColumnMajorContiguous",m),s(F,"isColumnMajorString",o),s(F,"isComplexFloatingPointDataType",l),s(F,"isContiguous",p),s(F,"isDataType",j),s(F,"isFloatingPointDataType",b),s(F,"isIndexMode",h),s(F,"isIntegerDataType",y),s(F,"isMostlySafeDataTypeCast",g),s(F,"isNumericDataType",f),s(F,"isOrder",v),s(F,"isOutputDataTypePolicy",c),s(F,"isReadOnly",x),s(F,"isRealDataType",u),s(F,"isRealFloatingPointDataType",C),s(F,"isRowMajor",D),s(F,"isRowMajorContiguous",T),s(F,"isRowMajorString",S),s(F,"isSafeDataTypeCast",M),s(F,"isSameKindDataTypeCast",w),s(F,"isScalarMostlySafeCompatible",R),s(F,"isSignedIntegerDataType",I),s(F,"isSingleSegmentCompatible",P),s(F,"isUnsignedIntegerDataType",B);export{F as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..0786f69 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;q/PAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,+BAAA6B,GAUA5B,EAAAD,EAAA,0BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B,GAUA9B,EAAAD,EAAA,4BAAAgC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 7891d66..0000000 --- a/lib/index.js +++ /dev/null @@ -1,321 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isScalarMostlySafeCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible} -*/ -setReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 19eafd8..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,94 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible": "github:stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible#main", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-complex-like": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/complex-float64-ctor": "^0.0.3", - "@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-min-signed-integer-dtype": "github:stdlib-js/ndarray-base-min-signed-integer-dtype#main", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-min-dtype": "^0.3.0", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..22e9e53 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 5789da874e81916bfa52b57f97d6655a50da4239 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Mar 2025 02:43:30 +0000 Subject: [PATCH 157/183] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index afbe837..19eafd8 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "@stdlib/ndarray-same-kind-casts": "^0.3.0", "@stdlib/random-base-discrete-uniform": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", From 321875f6f968fc3d3098e1d98b0a5a37d85f1812 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Mar 2025 02:43:52 +0000 Subject: [PATCH 158/183] Remove files --- index.d.ts | 967 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5814 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index d30366c..0000000 --- a/index.d.ts +++ /dev/null @@ -1,967 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isOutputDataTypePolicy = require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an input value is a supported ndarray output data type policy. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray output data type policy - * - * @example - * var bool = ns.isOutputDataTypePolicy( 'boolean' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'real' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'numeric' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'foo' ); - * // returns false - */ - isOutputDataTypePolicy: typeof isOutputDataTypePolicy; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index b12afaf..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var F={};s(F,"hasEqualShape",e),s(F,"isAllowedDataTypeCast",t),s(F,"isBooleanDataType",a),s(F,"isBufferLengthCompatible",r),s(F,"isBufferLengthCompatibleShape",i),s(F,"isCastingMode",d),s(F,"isColumnMajor",n),s(F,"isColumnMajorContiguous",m),s(F,"isColumnMajorString",o),s(F,"isComplexFloatingPointDataType",l),s(F,"isContiguous",p),s(F,"isDataType",j),s(F,"isFloatingPointDataType",b),s(F,"isIndexMode",h),s(F,"isIntegerDataType",y),s(F,"isMostlySafeDataTypeCast",g),s(F,"isNumericDataType",f),s(F,"isOrder",v),s(F,"isOutputDataTypePolicy",c),s(F,"isReadOnly",x),s(F,"isRealDataType",u),s(F,"isRealFloatingPointDataType",C),s(F,"isRowMajor",D),s(F,"isRowMajorContiguous",T),s(F,"isRowMajorString",S),s(F,"isSafeDataTypeCast",M),s(F,"isSameKindDataTypeCast",w),s(F,"isScalarMostlySafeCompatible",R),s(F,"isSignedIntegerDataType",I),s(F,"isSingleSegmentCompatible",P),s(F,"isUnsignedIntegerDataType",B);export{F as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 0786f69..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;q/PAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,+BAAA6B,GAUA5B,EAAAD,EAAA,0BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B,GAUA9B,EAAAD,EAAA,4BAAAgC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 22e9e53..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 3c16ceddbe9bbb4b06b812850ffe8456c5370128 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Mar 2025 02:44:28 +0000 Subject: [PATCH 159/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1489 ------ CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 103 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 321 -- package.json | 114 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4899 insertions(+), 5458 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -151,7 +148,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -216,65 +213,65 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0be4c81..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isScalarMostlySafeCompatible",require('@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 593795c..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,+BAAgC,QAAS,8DAA+D,CAAE,EAS3HD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..b12afaf --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var F={};s(F,"hasEqualShape",e),s(F,"isAllowedDataTypeCast",t),s(F,"isBooleanDataType",a),s(F,"isBufferLengthCompatible",r),s(F,"isBufferLengthCompatibleShape",i),s(F,"isCastingMode",d),s(F,"isColumnMajor",n),s(F,"isColumnMajorContiguous",m),s(F,"isColumnMajorString",o),s(F,"isComplexFloatingPointDataType",l),s(F,"isContiguous",p),s(F,"isDataType",j),s(F,"isFloatingPointDataType",b),s(F,"isIndexMode",h),s(F,"isIntegerDataType",y),s(F,"isMostlySafeDataTypeCast",g),s(F,"isNumericDataType",f),s(F,"isOrder",v),s(F,"isOutputDataTypePolicy",c),s(F,"isReadOnly",x),s(F,"isRealDataType",u),s(F,"isRealFloatingPointDataType",C),s(F,"isRowMajor",D),s(F,"isRowMajorContiguous",T),s(F,"isRowMajorString",S),s(F,"isSafeDataTypeCast",M),s(F,"isSameKindDataTypeCast",w),s(F,"isScalarMostlySafeCompatible",R),s(F,"isSignedIntegerDataType",I),s(F,"isSingleSegmentCompatible",P),s(F,"isUnsignedIntegerDataType",B);export{F as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..0786f69 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;q/PAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,+BAAA6B,GAUA5B,EAAAD,EAAA,0BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B,GAUA9B,EAAAD,EAAA,4BAAAgC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 7891d66..0000000 --- a/lib/index.js +++ /dev/null @@ -1,321 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isScalarMostlySafeCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible} -*/ -setReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 19eafd8..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,94 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible": "github:stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible#main", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-complex-like": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/complex-float64-ctor": "^0.0.3", - "@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-min-signed-integer-dtype": "github:stdlib-js/ndarray-base-min-signed-integer-dtype#main", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-min-dtype": "^0.3.0", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..22e9e53 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 55d814ec96fc1cec6cd5e2fd3e5c465c7737d098 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Mar 2025 03:00:09 +0000 Subject: [PATCH 160/183] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index afbe837..19eafd8 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "@stdlib/ndarray-same-kind-casts": "^0.3.0", "@stdlib/random-base-discrete-uniform": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", From 344c3eeccd6530500be0850bbd236720eaf9a101 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Mar 2025 03:00:31 +0000 Subject: [PATCH 161/183] Remove files --- index.d.ts | 989 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5836 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a57db0d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,989 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isOutputDataTypePolicy = require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isScalarMostlySafeCompatible = require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an input value is a supported ndarray output data type policy. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray output data type policy - * - * @example - * var bool = ns.isOutputDataTypePolicy( 'boolean' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'real' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'numeric' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'foo' ); - * // returns false - */ - isOutputDataTypePolicy: typeof isOutputDataTypePolicy; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating whether a scalar value can be safely cast or, for floating-point data types, downcast to specified ndarray data type. - * - * @param value - scalar value - * @param dtype - ndarray data type - * @returns boolean indicating whether a scalar value can be safely cast - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.0, 'float64' ); - * // returns true - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.14, 'int32' ); - * // returns false - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( -1, 'uint32' ); - * // returns false - */ - isScalarMostlySafeCompatible: typeof isScalarMostlySafeCompatible; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index b12afaf..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var F={};s(F,"hasEqualShape",e),s(F,"isAllowedDataTypeCast",t),s(F,"isBooleanDataType",a),s(F,"isBufferLengthCompatible",r),s(F,"isBufferLengthCompatibleShape",i),s(F,"isCastingMode",d),s(F,"isColumnMajor",n),s(F,"isColumnMajorContiguous",m),s(F,"isColumnMajorString",o),s(F,"isComplexFloatingPointDataType",l),s(F,"isContiguous",p),s(F,"isDataType",j),s(F,"isFloatingPointDataType",b),s(F,"isIndexMode",h),s(F,"isIntegerDataType",y),s(F,"isMostlySafeDataTypeCast",g),s(F,"isNumericDataType",f),s(F,"isOrder",v),s(F,"isOutputDataTypePolicy",c),s(F,"isReadOnly",x),s(F,"isRealDataType",u),s(F,"isRealFloatingPointDataType",C),s(F,"isRowMajor",D),s(F,"isRowMajorContiguous",T),s(F,"isRowMajorString",S),s(F,"isSafeDataTypeCast",M),s(F,"isSameKindDataTypeCast",w),s(F,"isScalarMostlySafeCompatible",R),s(F,"isSignedIntegerDataType",I),s(F,"isSingleSegmentCompatible",P),s(F,"isUnsignedIntegerDataType",B);export{F as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 0786f69..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;q/PAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,+BAAA6B,GAUA5B,EAAAD,EAAA,0BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B,GAUA9B,EAAAD,EAAA,4BAAAgC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 22e9e53..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 45c6c232337a3781711e768d23b7a987e35940fc Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Mon, 24 Mar 2025 03:01:26 +0000 Subject: [PATCH 162/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 1490 ------ CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 105 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 321 -- package.json | 114 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4900 insertions(+), 5460 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -152,7 +149,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -217,67 +214,67 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible +[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0be4c81..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isScalarMostlySafeCompatible",require('@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 593795c..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,+BAAgC,QAAS,8DAA+D,CAAE,EAS3HD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..b12afaf --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var F={};s(F,"hasEqualShape",e),s(F,"isAllowedDataTypeCast",t),s(F,"isBooleanDataType",a),s(F,"isBufferLengthCompatible",r),s(F,"isBufferLengthCompatibleShape",i),s(F,"isCastingMode",d),s(F,"isColumnMajor",n),s(F,"isColumnMajorContiguous",m),s(F,"isColumnMajorString",o),s(F,"isComplexFloatingPointDataType",l),s(F,"isContiguous",p),s(F,"isDataType",j),s(F,"isFloatingPointDataType",b),s(F,"isIndexMode",h),s(F,"isIntegerDataType",y),s(F,"isMostlySafeDataTypeCast",g),s(F,"isNumericDataType",f),s(F,"isOrder",v),s(F,"isOutputDataTypePolicy",c),s(F,"isReadOnly",x),s(F,"isRealDataType",u),s(F,"isRealFloatingPointDataType",C),s(F,"isRowMajor",D),s(F,"isRowMajorContiguous",T),s(F,"isRowMajorString",S),s(F,"isSafeDataTypeCast",M),s(F,"isSameKindDataTypeCast",w),s(F,"isScalarMostlySafeCompatible",R),s(F,"isSignedIntegerDataType",I),s(F,"isSingleSegmentCompatible",P),s(F,"isUnsignedIntegerDataType",B);export{F as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..0786f69 --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;q/PAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,+BAAA6B,GAUA5B,EAAAD,EAAA,0BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B,GAUA9B,EAAAD,EAAA,4BAAAgC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 7891d66..0000000 --- a/lib/index.js +++ /dev/null @@ -1,321 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isScalarMostlySafeCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible} -*/ -setReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 19eafd8..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,94 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible": "github:stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible#main", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-complex-like": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/complex-float64-ctor": "^0.0.3", - "@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-min-signed-integer-dtype": "github:stdlib-js/ndarray-base-min-signed-integer-dtype#main", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-min-dtype": "^0.3.0", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..22e9e53 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 3dd2373008ee7bc0fbb5a88dac8b90916a068ec8 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 26 Apr 2025 00:52:41 +0000 Subject: [PATCH 163/183] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd42923..ff43243 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "@stdlib/ndarray-same-kind-casts": "^0.3.0", "@stdlib/random-base-discrete-uniform": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", From 43f461fef93bb5e0eb26b01b0a7c7096d691b8ac Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 26 Apr 2025 00:53:00 +0000 Subject: [PATCH 164/183] Remove files --- index.d.ts | 989 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5836 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a57db0d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,989 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isOutputDataTypePolicy = require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isScalarMostlySafeCompatible = require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an input value is a supported ndarray output data type policy. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray output data type policy - * - * @example - * var bool = ns.isOutputDataTypePolicy( 'boolean' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'real' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'numeric' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'foo' ); - * // returns false - */ - isOutputDataTypePolicy: typeof isOutputDataTypePolicy; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating whether a scalar value can be safely cast or, for floating-point data types, downcast to specified ndarray data type. - * - * @param value - scalar value - * @param dtype - ndarray data type - * @returns boolean indicating whether a scalar value can be safely cast - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.0, 'float64' ); - * // returns true - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.14, 'int32' ); - * // returns false - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( -1, 'uint32' ); - * // returns false - */ - isScalarMostlySafeCompatible: typeof isScalarMostlySafeCompatible; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index b12afaf..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var F={};s(F,"hasEqualShape",e),s(F,"isAllowedDataTypeCast",t),s(F,"isBooleanDataType",a),s(F,"isBufferLengthCompatible",r),s(F,"isBufferLengthCompatibleShape",i),s(F,"isCastingMode",d),s(F,"isColumnMajor",n),s(F,"isColumnMajorContiguous",m),s(F,"isColumnMajorString",o),s(F,"isComplexFloatingPointDataType",l),s(F,"isContiguous",p),s(F,"isDataType",j),s(F,"isFloatingPointDataType",b),s(F,"isIndexMode",h),s(F,"isIntegerDataType",y),s(F,"isMostlySafeDataTypeCast",g),s(F,"isNumericDataType",f),s(F,"isOrder",v),s(F,"isOutputDataTypePolicy",c),s(F,"isReadOnly",x),s(F,"isRealDataType",u),s(F,"isRealFloatingPointDataType",C),s(F,"isRowMajor",D),s(F,"isRowMajorContiguous",T),s(F,"isRowMajorString",S),s(F,"isSafeDataTypeCast",M),s(F,"isSameKindDataTypeCast",w),s(F,"isScalarMostlySafeCompatible",R),s(F,"isSignedIntegerDataType",I),s(F,"isSingleSegmentCompatible",P),s(F,"isUnsignedIntegerDataType",B);export{F as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 0786f69..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexMode","isIntegerDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;q/PAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,2BAAAK,GAUAJ,EAAAD,EAAA,gCAAAM,GAUAL,EAAAD,EAAA,gBAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,0BAAAS,GAUAR,EAAAD,EAAA,sBAAAU,GAUAT,EAAAD,EAAA,iCAAAW,GAUAV,EAAAD,EAAA,eAAAY,GAUAX,EAAAD,EAAA,aAAAa,GAUAZ,EAAAD,EAAA,0BAAAc,GAUAb,EAAAD,EAAA,cAAAe,GAUAd,EAAAD,EAAA,oBAAAgB,GAUAf,EAAAD,EAAA,2BAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,UAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,aAAAqB,GAUApB,EAAAD,EAAA,iBAAAsB,GAUArB,EAAAD,EAAA,8BAAAuB,GAUAtB,EAAAD,EAAA,aAAAwB,GAUAvB,EAAAD,EAAA,uBAAAyB,GAUAxB,EAAAD,EAAA,mBAAA0B,GAUAzB,EAAAD,EAAA,qBAAA2B,GAUA1B,EAAAD,EAAA,yBAAA4B,GAUA3B,EAAAD,EAAA,+BAAA6B,GAUA5B,EAAAD,EAAA,0BAAA8B,GAUA7B,EAAAD,EAAA,4BAAA+B,GAUA9B,EAAAD,EAAA,4BAAAgC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 22e9e53..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From f225653d35c1dcd80bcb9982cfda371882f471e3 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 26 Apr 2025 00:54:10 +0000 Subject: [PATCH 165/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 426 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 105 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 357 -- package.json | 118 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4900 insertions(+), 4436 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -152,7 +149,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -217,67 +214,67 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible +[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0205f48..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));r(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));r(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanIndexDataType",require('@stdlib/ndarray-base-assert-is-boolean-index-data-type/dist'));r(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));r(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));r(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));r(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));r(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));r(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));r(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));r(e,"isIndexDataType",require('@stdlib/ndarray-base-assert-is-index-data-type/dist'));r(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));r(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));r(e,"isIntegerIndexDataType",require('@stdlib/ndarray-base-assert-is-integer-index-data-type/dist'));r(e,"isMaskIndexDataType",require('@stdlib/ndarray-base-assert-is-mask-index-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));r(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));r(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));r(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));r(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));r(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));r(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));r(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isScalarMostlySafeCompatible",require('@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));r(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 902cbb3..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nsetReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nsetReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nsetReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nsetReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,kBAAmB,QAAS,gDAAiD,CAAE,EAShGD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,sBAAuB,QAAS,qDAAsD,CAAE,EASzGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,+BAAgC,QAAS,8DAA+D,CAAE,EAS3HD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..708128a --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var L={};s(L,"hasEqualShape",e),s(L,"isAllowedDataTypeCast",t),s(L,"isBooleanDataType",a),s(L,"isBooleanIndexDataType",r),s(L,"isBufferLengthCompatible",i),s(L,"isBufferLengthCompatibleShape",d),s(L,"isCastingMode",n),s(L,"isColumnMajor",m),s(L,"isColumnMajorContiguous",o),s(L,"isColumnMajorString",l),s(L,"isComplexFloatingPointDataType",p),s(L,"isContiguous",j),s(L,"isDataType",b),s(L,"isFloatingPointDataType",y),s(L,"isIndexDataType",h),s(L,"isIndexMode",g),s(L,"isIntegerDataType",f),s(L,"isIntegerIndexDataType",x),s(L,"isMaskIndexDataType",v),s(L,"isMostlySafeDataTypeCast",c),s(L,"isNumericDataType",u),s(L,"isOrder",D),s(L,"isOutputDataTypePolicy",T),s(L,"isReadOnly",C),s(L,"isRealDataType",S),s(L,"isRealFloatingPointDataType",M),s(L,"isRowMajor",I),s(L,"isRowMajorContiguous",w),s(L,"isRowMajorString",R),s(L,"isSafeDataTypeCast",B),s(L,"isSameKindDataTypeCast",P),s(L,"isScalarMostlySafeCompatible",k),s(L,"isSignedIntegerDataType",F),s(L,"isSingleSegmentCompatible",O),s(L,"isUnsignedIntegerDataType",q);export{L as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..0f2eb3e --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;q+RAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,yBAAAmB,GAUAlB,EAAAD,EAAA,sBAAAoB,GAUAnB,EAAAD,EAAA,2BAAAqB,GAUApB,EAAAD,EAAA,oBAAAsB,GAUArB,EAAAD,EAAA,UAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,aAAAyB,GAUAxB,EAAAD,EAAA,iBAAA0B,GAUAzB,EAAAD,EAAA,8BAAA2B,GAUA1B,EAAAD,EAAA,aAAA4B,GAUA3B,EAAAD,EAAA,uBAAA6B,GAUA5B,EAAAD,EAAA,mBAAA8B,GAUA7B,EAAAD,EAAA,qBAAA+B,GAUA9B,EAAAD,EAAA,yBAAAgC,GAUA/B,EAAAD,EAAA,+BAAAiC,GAUAhC,EAAAD,EAAA,0BAAAkC,GAUAjC,EAAAD,EAAA,4BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 31b3b43..0000000 --- a/lib/index.js +++ /dev/null @@ -1,357 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type} -*/ -setReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type} -*/ -setReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isIntegerIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type} -*/ -setReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) ); - -/** -* @name isMaskIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type} -*/ -setReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isScalarMostlySafeCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible} -*/ -setReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index ff43243..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,98 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-boolean-index-data-type": "github:stdlib-js/ndarray-base-assert-is-boolean-index-data-type#main", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-data-type": "github:stdlib-js/ndarray-base-assert-is-index-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-index-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mask-index-data-type": "github:stdlib-js/ndarray-base-assert-is-mask-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible": "github:stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible#main", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-complex-like": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/complex-float64-ctor": "^0.0.3", - "@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-min-signed-integer-dtype": "github:stdlib-js/ndarray-base-min-signed-integer-dtype#main", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-min-dtype": "^0.3.0", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5aad0d9 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 1169a954b0e1aaebd40ef7463c8b26c3ff0f29ba Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 26 Apr 2025 03:00:12 +0000 Subject: [PATCH 166/183] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd42923..ff43243 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "@stdlib/ndarray-same-kind-casts": "^0.3.0", "@stdlib/random-base-discrete-uniform": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", From 70e1c982151f449b659393c9a0876e39df8417cb Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 26 Apr 2025 03:02:20 +0000 Subject: [PATCH 167/183] Remove files --- index.d.ts | 989 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5836 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a57db0d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,989 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isOutputDataTypePolicy = require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isScalarMostlySafeCompatible = require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an input value is a supported ndarray output data type policy. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray output data type policy - * - * @example - * var bool = ns.isOutputDataTypePolicy( 'boolean' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'real' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'numeric' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'foo' ); - * // returns false - */ - isOutputDataTypePolicy: typeof isOutputDataTypePolicy; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating whether a scalar value can be safely cast or, for floating-point data types, downcast to specified ndarray data type. - * - * @param value - scalar value - * @param dtype - ndarray data type - * @returns boolean indicating whether a scalar value can be safely cast - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.0, 'float64' ); - * // returns true - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.14, 'int32' ); - * // returns false - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( -1, 'uint32' ); - * // returns false - */ - isScalarMostlySafeCompatible: typeof isScalarMostlySafeCompatible; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 708128a..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var L={};s(L,"hasEqualShape",e),s(L,"isAllowedDataTypeCast",t),s(L,"isBooleanDataType",a),s(L,"isBooleanIndexDataType",r),s(L,"isBufferLengthCompatible",i),s(L,"isBufferLengthCompatibleShape",d),s(L,"isCastingMode",n),s(L,"isColumnMajor",m),s(L,"isColumnMajorContiguous",o),s(L,"isColumnMajorString",l),s(L,"isComplexFloatingPointDataType",p),s(L,"isContiguous",j),s(L,"isDataType",b),s(L,"isFloatingPointDataType",y),s(L,"isIndexDataType",h),s(L,"isIndexMode",g),s(L,"isIntegerDataType",f),s(L,"isIntegerIndexDataType",x),s(L,"isMaskIndexDataType",v),s(L,"isMostlySafeDataTypeCast",c),s(L,"isNumericDataType",u),s(L,"isOrder",D),s(L,"isOutputDataTypePolicy",T),s(L,"isReadOnly",C),s(L,"isRealDataType",S),s(L,"isRealFloatingPointDataType",M),s(L,"isRowMajor",I),s(L,"isRowMajorContiguous",w),s(L,"isRowMajorString",R),s(L,"isSafeDataTypeCast",B),s(L,"isSameKindDataTypeCast",P),s(L,"isScalarMostlySafeCompatible",k),s(L,"isSignedIntegerDataType",F),s(L,"isSingleSegmentCompatible",O),s(L,"isUnsignedIntegerDataType",q);export{L as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 0f2eb3e..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;q+RAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,yBAAAmB,GAUAlB,EAAAD,EAAA,sBAAAoB,GAUAnB,EAAAD,EAAA,2BAAAqB,GAUApB,EAAAD,EAAA,oBAAAsB,GAUArB,EAAAD,EAAA,UAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,aAAAyB,GAUAxB,EAAAD,EAAA,iBAAA0B,GAUAzB,EAAAD,EAAA,8BAAA2B,GAUA1B,EAAAD,EAAA,aAAA4B,GAUA3B,EAAAD,EAAA,uBAAA6B,GAUA5B,EAAAD,EAAA,mBAAA8B,GAUA7B,EAAAD,EAAA,qBAAA+B,GAUA9B,EAAAD,EAAA,yBAAAgC,GAUA/B,EAAAD,EAAA,+BAAAiC,GAUAhC,EAAAD,EAAA,0BAAAkC,GAUAjC,EAAAD,EAAA,4BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 5aad0d9..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From dc7c7801ee56da7af8e77e519eedfd9608b781ae Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 26 Apr 2025 03:02:58 +0000 Subject: [PATCH 168/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 427 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 113 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 357 -- package.json | 118 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4904 insertions(+), 4441 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -156,7 +153,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -221,75 +218,75 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type +[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type +[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type +[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type +[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible +[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0205f48..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var r=require('@stdlib/utils-define-read-only-property/dist'),e={};r(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));r(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));r(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));r(e,"isBooleanIndexDataType",require('@stdlib/ndarray-base-assert-is-boolean-index-data-type/dist'));r(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));r(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));r(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));r(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));r(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));r(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));r(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));r(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));r(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));r(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));r(e,"isIndexDataType",require('@stdlib/ndarray-base-assert-is-index-data-type/dist'));r(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));r(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));r(e,"isIntegerIndexDataType",require('@stdlib/ndarray-base-assert-is-integer-index-data-type/dist'));r(e,"isMaskIndexDataType",require('@stdlib/ndarray-base-assert-is-mask-index-data-type/dist'));r(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));r(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));r(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));r(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));r(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));r(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));r(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));r(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));r(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));r(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));r(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));r(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));r(e,"isScalarMostlySafeCompatible",require('@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible/dist'));r(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));r(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));r(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 902cbb3..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nsetReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nsetReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nsetReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nsetReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,kBAAmB,QAAS,gDAAiD,CAAE,EAShGD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,sBAAuB,QAAS,qDAAsD,CAAE,EASzGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,+BAAgC,QAAS,8DAA+D,CAAE,EAS3HD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..708128a --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var L={};s(L,"hasEqualShape",e),s(L,"isAllowedDataTypeCast",t),s(L,"isBooleanDataType",a),s(L,"isBooleanIndexDataType",r),s(L,"isBufferLengthCompatible",i),s(L,"isBufferLengthCompatibleShape",d),s(L,"isCastingMode",n),s(L,"isColumnMajor",m),s(L,"isColumnMajorContiguous",o),s(L,"isColumnMajorString",l),s(L,"isComplexFloatingPointDataType",p),s(L,"isContiguous",j),s(L,"isDataType",b),s(L,"isFloatingPointDataType",y),s(L,"isIndexDataType",h),s(L,"isIndexMode",g),s(L,"isIntegerDataType",f),s(L,"isIntegerIndexDataType",x),s(L,"isMaskIndexDataType",v),s(L,"isMostlySafeDataTypeCast",c),s(L,"isNumericDataType",u),s(L,"isOrder",D),s(L,"isOutputDataTypePolicy",T),s(L,"isReadOnly",C),s(L,"isRealDataType",S),s(L,"isRealFloatingPointDataType",M),s(L,"isRowMajor",I),s(L,"isRowMajorContiguous",w),s(L,"isRowMajorString",R),s(L,"isSafeDataTypeCast",B),s(L,"isSameKindDataTypeCast",P),s(L,"isScalarMostlySafeCompatible",k),s(L,"isSignedIntegerDataType",F),s(L,"isSingleSegmentCompatible",O),s(L,"isUnsignedIntegerDataType",q);export{L as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..0f2eb3e --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;q+RAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,yBAAAmB,GAUAlB,EAAAD,EAAA,sBAAAoB,GAUAnB,EAAAD,EAAA,2BAAAqB,GAUApB,EAAAD,EAAA,oBAAAsB,GAUArB,EAAAD,EAAA,UAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,aAAAyB,GAUAxB,EAAAD,EAAA,iBAAA0B,GAUAzB,EAAAD,EAAA,8BAAA2B,GAUA1B,EAAAD,EAAA,aAAA4B,GAUA3B,EAAAD,EAAA,uBAAA6B,GAUA5B,EAAAD,EAAA,mBAAA8B,GAUA7B,EAAAD,EAAA,qBAAA+B,GAUA9B,EAAAD,EAAA,yBAAAgC,GAUA/B,EAAAD,EAAA,+BAAAiC,GAUAhC,EAAAD,EAAA,0BAAAkC,GAUAjC,EAAAD,EAAA,4BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 31b3b43..0000000 --- a/lib/index.js +++ /dev/null @@ -1,357 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type} -*/ -setReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type} -*/ -setReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isIntegerIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type} -*/ -setReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) ); - -/** -* @name isMaskIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type} -*/ -setReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isScalarMostlySafeCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible} -*/ -setReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index ff43243..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,98 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-boolean-index-data-type": "github:stdlib-js/ndarray-base-assert-is-boolean-index-data-type#main", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-data-type": "github:stdlib-js/ndarray-base-assert-is-index-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-index-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mask-index-data-type": "github:stdlib-js/ndarray-base-assert-is-mask-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible": "github:stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible#main", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-complex-like": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/complex-float64-ctor": "^0.0.3", - "@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-min-signed-integer-dtype": "github:stdlib-js/ndarray-base-min-signed-integer-dtype#main", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-min-dtype": "^0.3.0", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..5aad0d9 --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 9ffe89816734f8fc5525ff5ebb049ddb22758d06 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 26 Apr 2025 09:50:30 +0000 Subject: [PATCH 169/183] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 54b065a..4d8b80c 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "@stdlib/ndarray-same-kind-casts": "^0.3.0", "@stdlib/random-base-discrete-uniform": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", From 4298f6fd7c166a287beb190b9e7edc350cab2b8f Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 26 Apr 2025 09:50:47 +0000 Subject: [PATCH 170/183] Remove files --- index.d.ts | 989 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5836 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a57db0d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,989 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isOutputDataTypePolicy = require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isScalarMostlySafeCompatible = require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an input value is a supported ndarray output data type policy. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray output data type policy - * - * @example - * var bool = ns.isOutputDataTypePolicy( 'boolean' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'real' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'numeric' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'foo' ); - * // returns false - */ - isOutputDataTypePolicy: typeof isOutputDataTypePolicy; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating whether a scalar value can be safely cast or, for floating-point data types, downcast to specified ndarray data type. - * - * @param value - scalar value - * @param dtype - ndarray data type - * @returns boolean indicating whether a scalar value can be safely cast - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.0, 'float64' ); - * // returns true - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.14, 'int32' ); - * // returns false - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( -1, 'uint32' ); - * // returns false - */ - isScalarMostlySafeCompatible: typeof isScalarMostlySafeCompatible; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 708128a..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var L={};s(L,"hasEqualShape",e),s(L,"isAllowedDataTypeCast",t),s(L,"isBooleanDataType",a),s(L,"isBooleanIndexDataType",r),s(L,"isBufferLengthCompatible",i),s(L,"isBufferLengthCompatibleShape",d),s(L,"isCastingMode",n),s(L,"isColumnMajor",m),s(L,"isColumnMajorContiguous",o),s(L,"isColumnMajorString",l),s(L,"isComplexFloatingPointDataType",p),s(L,"isContiguous",j),s(L,"isDataType",b),s(L,"isFloatingPointDataType",y),s(L,"isIndexDataType",h),s(L,"isIndexMode",g),s(L,"isIntegerDataType",f),s(L,"isIntegerIndexDataType",x),s(L,"isMaskIndexDataType",v),s(L,"isMostlySafeDataTypeCast",c),s(L,"isNumericDataType",u),s(L,"isOrder",D),s(L,"isOutputDataTypePolicy",T),s(L,"isReadOnly",C),s(L,"isRealDataType",S),s(L,"isRealFloatingPointDataType",M),s(L,"isRowMajor",I),s(L,"isRowMajorContiguous",w),s(L,"isRowMajorString",R),s(L,"isSafeDataTypeCast",B),s(L,"isSameKindDataTypeCast",P),s(L,"isScalarMostlySafeCompatible",k),s(L,"isSignedIntegerDataType",F),s(L,"isSingleSegmentCompatible",O),s(L,"isUnsignedIntegerDataType",q);export{L as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index 0f2eb3e..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;q+RAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,oBAAAkB,GAUAjB,EAAAD,EAAA,yBAAAmB,GAUAlB,EAAAD,EAAA,sBAAAoB,GAUAnB,EAAAD,EAAA,2BAAAqB,GAUApB,EAAAD,EAAA,oBAAAsB,GAUArB,EAAAD,EAAA,UAAAuB,GAUAtB,EAAAD,EAAA,yBAAAwB,GAUAvB,EAAAD,EAAA,aAAAyB,GAUAxB,EAAAD,EAAA,iBAAA0B,GAUAzB,EAAAD,EAAA,8BAAA2B,GAUA1B,EAAAD,EAAA,aAAA4B,GAUA3B,EAAAD,EAAA,uBAAA6B,GAUA5B,EAAAD,EAAA,mBAAA8B,GAUA7B,EAAAD,EAAA,qBAAA+B,GAUA9B,EAAAD,EAAA,yBAAAgC,GAUA/B,EAAAD,EAAA,+BAAAiC,GAUAhC,EAAAD,EAAA,0BAAAkC,GAUAjC,EAAAD,EAAA,4BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 5aad0d9..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 5470651b0279750204638813bf9e547050c0e55b Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 26 Apr 2025 09:51:50 +0000 Subject: [PATCH 171/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 431 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 113 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 366 -- package.json | 120 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4904 insertions(+), 4456 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -156,7 +153,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -221,75 +218,75 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type +[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type +[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type +[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type +[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible +[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 864714b..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBooleanIndexDataType",require('@stdlib/ndarray-base-assert-is-boolean-index-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexDataType",require('@stdlib/ndarray-base-assert-is-index-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isInputCastingPolicy",require('@stdlib/ndarray-base-assert-is-input-casting-policy/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isIntegerIndexDataType",require('@stdlib/ndarray-base-assert-is-integer-index-data-type/dist'));i(e,"isMaskIndexDataType",require('@stdlib/ndarray-base-assert-is-mask-index-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isScalarMostlySafeCompatible",require('@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index f339bd5..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nsetReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nsetReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nsetReadOnly( ns, 'isInputCastingPolicy', require( '@stdlib/ndarray-base-assert-is-input-casting-policy' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nsetReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nsetReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,kBAAmB,QAAS,gDAAiD,CAAE,EAShGD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,sBAAuB,QAAS,qDAAsD,CAAE,EASzGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,+BAAgC,QAAS,8DAA+D,CAAE,EAS3HD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..3896638 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";export{default as isInputCastingPolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import L from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var A={};s(A,"hasEqualShape",e),s(A,"isAllowedDataTypeCast",t),s(A,"isBooleanDataType",a),s(A,"isBooleanIndexDataType",r),s(A,"isBufferLengthCompatible",i),s(A,"isBufferLengthCompatibleShape",d),s(A,"isCastingMode",n),s(A,"isColumnMajor",m),s(A,"isColumnMajorContiguous",o),s(A,"isColumnMajorString",l),s(A,"isComplexFloatingPointDataType",p),s(A,"isContiguous",j),s(A,"isDataType",y),s(A,"isFloatingPointDataType",b),s(A,"isIndexDataType",h),s(A,"isIndexMode",g),s(A,"isInputCastingPolicy",f),s(A,"isIntegerDataType",x),s(A,"isIntegerIndexDataType",v),s(A,"isMaskIndexDataType",c),s(A,"isMostlySafeDataTypeCast",u),s(A,"isNumericDataType",D),s(A,"isOrder",T),s(A,"isOutputDataTypePolicy",C),s(A,"isReadOnly",S),s(A,"isRealDataType",M),s(A,"isRealFloatingPointDataType",I),s(A,"isRowMajor",w),s(A,"isRowMajorContiguous",R),s(A,"isRowMajorString",P),s(A,"isSafeDataTypeCast",B),s(A,"isSameKindDataTypeCast",k),s(A,"isScalarMostlySafeCompatible",F),s(A,"isSignedIntegerDataType",O),s(A,"isSingleSegmentCompatible",q),s(A,"isUnsignedIntegerDataType",L);export{A as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ee9417b --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nimport isInputCastingPolicy from '@stdlib/ndarray-base-assert-is-input-casting-policy';\nsetReadOnly( ns, 'isInputCastingPolicy', isInputCastingPolicy );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isInputCastingPolicy","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;iuSAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,uBAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,sBAAAqB,GAUApB,EAAAD,EAAA,2BAAAsB,GAUArB,EAAAD,EAAA,oBAAAuB,GAUAtB,EAAAD,EAAA,UAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,aAAA0B,GAUAzB,EAAAD,EAAA,iBAAA2B,GAUA1B,EAAAD,EAAA,8BAAA4B,GAUA3B,EAAAD,EAAA,aAAA6B,GAUA5B,EAAAD,EAAA,uBAAA8B,GAUA7B,EAAAD,EAAA,mBAAA+B,GAUA9B,EAAAD,EAAA,qBAAAgC,GAUA/B,EAAAD,EAAA,yBAAAiC,GAUAhC,EAAAD,EAAA,+BAAAkC,GAUAjC,EAAAD,EAAA,0BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC,GAUAnC,EAAAD,EAAA,4BAAAqC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index c27a732..0000000 --- a/lib/index.js +++ /dev/null @@ -1,366 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type} -*/ -setReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type} -*/ -setReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isInputCastingPolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy} -*/ -setReadOnly( ns, 'isInputCastingPolicy', require( '@stdlib/ndarray-base-assert-is-input-casting-policy' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isIntegerIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type} -*/ -setReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) ); - -/** -* @name isMaskIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type} -*/ -setReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isScalarMostlySafeCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible} -*/ -setReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d8b80c..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,100 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-boolean-index-data-type": "github:stdlib-js/ndarray-base-assert-is-boolean-index-data-type#main", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-data-type": "github:stdlib-js/ndarray-base-assert-is-index-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-input-casting-policy": "github:stdlib-js/ndarray-base-assert-is-input-casting-policy#main", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-index-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mask-index-data-type": "github:stdlib-js/ndarray-base-assert-is-mask-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible": "github:stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible#main", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-complex-like": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/complex-float64-ctor": "^0.0.3", - "@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-min-signed-integer-dtype": "github:stdlib-js/ndarray-base-min-signed-integer-dtype#main", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-input-casting-policies": "github:stdlib-js/ndarray-input-casting-policies#main", - "@stdlib/ndarray-min-dtype": "^0.3.0", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..98e635f --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 7a811900ad8ce0b84f309ccc801300819d0e35b6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 29 Apr 2025 03:02:10 +0000 Subject: [PATCH 172/183] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 54b065a..4d8b80c 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "@stdlib/ndarray-same-kind-casts": "^0.3.0", "@stdlib/random-base-discrete-uniform": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", From 1c1c7482d77f0970e73efdd6579ff9d7daab1737 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 29 Apr 2025 03:11:41 +0000 Subject: [PATCH 173/183] Remove files --- index.d.ts | 989 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5836 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a57db0d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,989 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isOutputDataTypePolicy = require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isScalarMostlySafeCompatible = require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an input value is a supported ndarray output data type policy. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray output data type policy - * - * @example - * var bool = ns.isOutputDataTypePolicy( 'boolean' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'real' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'numeric' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'foo' ); - * // returns false - */ - isOutputDataTypePolicy: typeof isOutputDataTypePolicy; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating whether a scalar value can be safely cast or, for floating-point data types, downcast to specified ndarray data type. - * - * @param value - scalar value - * @param dtype - ndarray data type - * @returns boolean indicating whether a scalar value can be safely cast - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.0, 'float64' ); - * // returns true - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.14, 'int32' ); - * // returns false - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( -1, 'uint32' ); - * // returns false - */ - isScalarMostlySafeCompatible: typeof isScalarMostlySafeCompatible; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 3896638..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";export{default as isInputCastingPolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import L from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var A={};s(A,"hasEqualShape",e),s(A,"isAllowedDataTypeCast",t),s(A,"isBooleanDataType",a),s(A,"isBooleanIndexDataType",r),s(A,"isBufferLengthCompatible",i),s(A,"isBufferLengthCompatibleShape",d),s(A,"isCastingMode",n),s(A,"isColumnMajor",m),s(A,"isColumnMajorContiguous",o),s(A,"isColumnMajorString",l),s(A,"isComplexFloatingPointDataType",p),s(A,"isContiguous",j),s(A,"isDataType",y),s(A,"isFloatingPointDataType",b),s(A,"isIndexDataType",h),s(A,"isIndexMode",g),s(A,"isInputCastingPolicy",f),s(A,"isIntegerDataType",x),s(A,"isIntegerIndexDataType",v),s(A,"isMaskIndexDataType",c),s(A,"isMostlySafeDataTypeCast",u),s(A,"isNumericDataType",D),s(A,"isOrder",T),s(A,"isOutputDataTypePolicy",C),s(A,"isReadOnly",S),s(A,"isRealDataType",M),s(A,"isRealFloatingPointDataType",I),s(A,"isRowMajor",w),s(A,"isRowMajorContiguous",R),s(A,"isRowMajorString",P),s(A,"isSafeDataTypeCast",B),s(A,"isSameKindDataTypeCast",k),s(A,"isScalarMostlySafeCompatible",F),s(A,"isSignedIntegerDataType",O),s(A,"isSingleSegmentCompatible",q),s(A,"isUnsignedIntegerDataType",L);export{A as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ee9417b..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nimport isInputCastingPolicy from '@stdlib/ndarray-base-assert-is-input-casting-policy';\nsetReadOnly( ns, 'isInputCastingPolicy', isInputCastingPolicy );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isInputCastingPolicy","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;iuSAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,uBAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,sBAAAqB,GAUApB,EAAAD,EAAA,2BAAAsB,GAUArB,EAAAD,EAAA,oBAAAuB,GAUAtB,EAAAD,EAAA,UAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,aAAA0B,GAUAzB,EAAAD,EAAA,iBAAA2B,GAUA1B,EAAAD,EAAA,8BAAA4B,GAUA3B,EAAAD,EAAA,aAAA6B,GAUA5B,EAAAD,EAAA,uBAAA8B,GAUA7B,EAAAD,EAAA,mBAAA+B,GAUA9B,EAAAD,EAAA,qBAAAgC,GAUA/B,EAAAD,EAAA,yBAAAiC,GAUAhC,EAAAD,EAAA,+BAAAkC,GAUAjC,EAAAD,EAAA,0BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC,GAUAnC,EAAAD,EAAA,4BAAAqC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 98e635f..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From b12adcb0e9b77a3c2c7bd697fc633c510f00d3ed Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 29 Apr 2025 03:12:27 +0000 Subject: [PATCH 174/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 433 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 115 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 366 -- package.json | 120 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4905 insertions(+), 4459 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -157,7 +154,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -222,77 +219,77 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type +[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type +[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-input-casting-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-input-casting-policy +[@stdlib/ndarray/base/assert/is-input-casting-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-input-casting-policy/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type +[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type +[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible +[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 864714b..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBooleanIndexDataType",require('@stdlib/ndarray-base-assert-is-boolean-index-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexDataType",require('@stdlib/ndarray-base-assert-is-index-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isInputCastingPolicy",require('@stdlib/ndarray-base-assert-is-input-casting-policy/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isIntegerIndexDataType",require('@stdlib/ndarray-base-assert-is-integer-index-data-type/dist'));i(e,"isMaskIndexDataType",require('@stdlib/ndarray-base-assert-is-mask-index-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isScalarMostlySafeCompatible",require('@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index f339bd5..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nsetReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nsetReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nsetReadOnly( ns, 'isInputCastingPolicy', require( '@stdlib/ndarray-base-assert-is-input-casting-policy' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nsetReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nsetReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,kBAAmB,QAAS,gDAAiD,CAAE,EAShGD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,sBAAuB,QAAS,qDAAsD,CAAE,EASzGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,+BAAgC,QAAS,8DAA+D,CAAE,EAS3HD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..3896638 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";export{default as isInputCastingPolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import L from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var A={};s(A,"hasEqualShape",e),s(A,"isAllowedDataTypeCast",t),s(A,"isBooleanDataType",a),s(A,"isBooleanIndexDataType",r),s(A,"isBufferLengthCompatible",i),s(A,"isBufferLengthCompatibleShape",d),s(A,"isCastingMode",n),s(A,"isColumnMajor",m),s(A,"isColumnMajorContiguous",o),s(A,"isColumnMajorString",l),s(A,"isComplexFloatingPointDataType",p),s(A,"isContiguous",j),s(A,"isDataType",y),s(A,"isFloatingPointDataType",b),s(A,"isIndexDataType",h),s(A,"isIndexMode",g),s(A,"isInputCastingPolicy",f),s(A,"isIntegerDataType",x),s(A,"isIntegerIndexDataType",v),s(A,"isMaskIndexDataType",c),s(A,"isMostlySafeDataTypeCast",u),s(A,"isNumericDataType",D),s(A,"isOrder",T),s(A,"isOutputDataTypePolicy",C),s(A,"isReadOnly",S),s(A,"isRealDataType",M),s(A,"isRealFloatingPointDataType",I),s(A,"isRowMajor",w),s(A,"isRowMajorContiguous",R),s(A,"isRowMajorString",P),s(A,"isSafeDataTypeCast",B),s(A,"isSameKindDataTypeCast",k),s(A,"isScalarMostlySafeCompatible",F),s(A,"isSignedIntegerDataType",O),s(A,"isSingleSegmentCompatible",q),s(A,"isUnsignedIntegerDataType",L);export{A as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..ee9417b --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nimport isInputCastingPolicy from '@stdlib/ndarray-base-assert-is-input-casting-policy';\nsetReadOnly( ns, 'isInputCastingPolicy', isInputCastingPolicy );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isInputCastingPolicy","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;iuSAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,uBAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,sBAAAqB,GAUApB,EAAAD,EAAA,2BAAAsB,GAUArB,EAAAD,EAAA,oBAAAuB,GAUAtB,EAAAD,EAAA,UAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,aAAA0B,GAUAzB,EAAAD,EAAA,iBAAA2B,GAUA1B,EAAAD,EAAA,8BAAA4B,GAUA3B,EAAAD,EAAA,aAAA6B,GAUA5B,EAAAD,EAAA,uBAAA8B,GAUA7B,EAAAD,EAAA,mBAAA+B,GAUA9B,EAAAD,EAAA,qBAAAgC,GAUA/B,EAAAD,EAAA,yBAAAiC,GAUAhC,EAAAD,EAAA,+BAAAkC,GAUAjC,EAAAD,EAAA,0BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC,GAUAnC,EAAAD,EAAA,4BAAAqC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index c27a732..0000000 --- a/lib/index.js +++ /dev/null @@ -1,366 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type} -*/ -setReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type} -*/ -setReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isInputCastingPolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy} -*/ -setReadOnly( ns, 'isInputCastingPolicy', require( '@stdlib/ndarray-base-assert-is-input-casting-policy' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isIntegerIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type} -*/ -setReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) ); - -/** -* @name isMaskIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type} -*/ -setReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isScalarMostlySafeCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible} -*/ -setReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 4d8b80c..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,100 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-boolean-index-data-type": "github:stdlib-js/ndarray-base-assert-is-boolean-index-data-type#main", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-data-type": "github:stdlib-js/ndarray-base-assert-is-index-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-input-casting-policy": "github:stdlib-js/ndarray-base-assert-is-input-casting-policy#main", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-index-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mask-index-data-type": "github:stdlib-js/ndarray-base-assert-is-mask-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible": "github:stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible#main", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-complex-like": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/complex-float64-ctor": "^0.0.3", - "@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-min-signed-integer-dtype": "github:stdlib-js/ndarray-base-min-signed-integer-dtype#main", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-input-casting-policies": "github:stdlib-js/ndarray-input-casting-policies#main", - "@stdlib/ndarray-min-dtype": "^0.3.0", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..98e635f --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 41fa8d5178c3020a05111873a8bec5230df2eb63 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 20 Jun 2025 08:33:30 +0000 Subject: [PATCH 175/183] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1a73b04..d86c972 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "@stdlib/ndarray-same-kind-casts": "^0.3.0", "@stdlib/random-base-discrete-uniform": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", From c5846fc1799ac7bd120c2307673bc193bae6e665 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 20 Jun 2025 08:34:49 +0000 Subject: [PATCH 176/183] Remove files --- index.d.ts | 989 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5836 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a57db0d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,989 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isOutputDataTypePolicy = require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isScalarMostlySafeCompatible = require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an input value is a supported ndarray output data type policy. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray output data type policy - * - * @example - * var bool = ns.isOutputDataTypePolicy( 'boolean' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'real' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'numeric' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'foo' ); - * // returns false - */ - isOutputDataTypePolicy: typeof isOutputDataTypePolicy; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating whether a scalar value can be safely cast or, for floating-point data types, downcast to specified ndarray data type. - * - * @param value - scalar value - * @param dtype - ndarray data type - * @returns boolean indicating whether a scalar value can be safely cast - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.0, 'float64' ); - * // returns true - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.14, 'int32' ); - * // returns false - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( -1, 'uint32' ); - * // returns false - */ - isScalarMostlySafeCompatible: typeof isScalarMostlySafeCompatible; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index 3896638..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";export{default as isInputCastingPolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import L from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var A={};s(A,"hasEqualShape",e),s(A,"isAllowedDataTypeCast",t),s(A,"isBooleanDataType",a),s(A,"isBooleanIndexDataType",r),s(A,"isBufferLengthCompatible",i),s(A,"isBufferLengthCompatibleShape",d),s(A,"isCastingMode",n),s(A,"isColumnMajor",m),s(A,"isColumnMajorContiguous",o),s(A,"isColumnMajorString",l),s(A,"isComplexFloatingPointDataType",p),s(A,"isContiguous",j),s(A,"isDataType",y),s(A,"isFloatingPointDataType",b),s(A,"isIndexDataType",h),s(A,"isIndexMode",g),s(A,"isInputCastingPolicy",f),s(A,"isIntegerDataType",x),s(A,"isIntegerIndexDataType",v),s(A,"isMaskIndexDataType",c),s(A,"isMostlySafeDataTypeCast",u),s(A,"isNumericDataType",D),s(A,"isOrder",T),s(A,"isOutputDataTypePolicy",C),s(A,"isReadOnly",S),s(A,"isRealDataType",M),s(A,"isRealFloatingPointDataType",I),s(A,"isRowMajor",w),s(A,"isRowMajorContiguous",R),s(A,"isRowMajorString",P),s(A,"isSafeDataTypeCast",B),s(A,"isSameKindDataTypeCast",k),s(A,"isScalarMostlySafeCompatible",F),s(A,"isSignedIntegerDataType",O),s(A,"isSingleSegmentCompatible",q),s(A,"isUnsignedIntegerDataType",L);export{A as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index ee9417b..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nimport isInputCastingPolicy from '@stdlib/ndarray-base-assert-is-input-casting-policy';\nsetReadOnly( ns, 'isInputCastingPolicy', isInputCastingPolicy );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isInputCastingPolicy","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isUnsignedIntegerDataType"],"mappings":";;iuSAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,uBAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,sBAAAqB,GAUApB,EAAAD,EAAA,2BAAAsB,GAUArB,EAAAD,EAAA,oBAAAuB,GAUAtB,EAAAD,EAAA,UAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,aAAA0B,GAUAzB,EAAAD,EAAA,iBAAA2B,GAUA1B,EAAAD,EAAA,8BAAA4B,GAUA3B,EAAAD,EAAA,aAAA6B,GAUA5B,EAAAD,EAAA,uBAAA8B,GAUA7B,EAAAD,EAAA,mBAAA+B,GAUA9B,EAAAD,EAAA,qBAAAgC,GAUA/B,EAAAD,EAAA,yBAAAiC,GAUAhC,EAAAD,EAAA,+BAAAkC,GAUAjC,EAAAD,EAAA,0BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC,GAUAnC,EAAAD,EAAA,4BAAAqC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index 98e635f..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 5045e3574db68cd14effbc529a8cec28d89addbf Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 20 Jun 2025 08:35:50 +0000 Subject: [PATCH 177/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 441 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 115 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 375 -- package.json | 124 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4905 insertions(+), 4480 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -157,7 +154,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -222,77 +219,77 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type +[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type +[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-input-casting-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-input-casting-policy +[@stdlib/ndarray/base/assert/is-input-casting-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-input-casting-policy/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type +[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type +[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible +[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index f75f9ba..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBooleanIndexDataType",require('@stdlib/ndarray-base-assert-is-boolean-index-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexDataType",require('@stdlib/ndarray-base-assert-is-index-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isInputCastingPolicy",require('@stdlib/ndarray-base-assert-is-input-casting-policy/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isIntegerIndexDataType",require('@stdlib/ndarray-base-assert-is-integer-index-data-type/dist'));i(e,"isMaskIndexDataType",require('@stdlib/ndarray-base-assert-is-mask-index-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isScalarMostlySafeCompatible",require('@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isStructDataType",require('@stdlib/ndarray-base-assert-is-struct-data-type/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 92bade6..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nsetReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nsetReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nsetReadOnly( ns, 'isInputCastingPolicy', require( '@stdlib/ndarray-base-assert-is-input-casting-policy' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nsetReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nsetReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isStructDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-struct-data-type}\n*/\nsetReadOnly( ns, 'isStructDataType', require( '@stdlib/ndarray-base-assert-is-struct-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,kBAAmB,QAAS,gDAAiD,CAAE,EAShGD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,sBAAuB,QAAS,qDAAsD,CAAE,EASzGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,+BAAgC,QAAS,8DAA+D,CAAE,EAS3HD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..b85d8fe --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";export{default as isInputCastingPolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import L from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-struct-data-type@esm/index.mjs";export{default as isStructDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-struct-data-type@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var E={};s(E,"hasEqualShape",e),s(E,"isAllowedDataTypeCast",t),s(E,"isBooleanDataType",a),s(E,"isBooleanIndexDataType",r),s(E,"isBufferLengthCompatible",i),s(E,"isBufferLengthCompatibleShape",d),s(E,"isCastingMode",n),s(E,"isColumnMajor",m),s(E,"isColumnMajorContiguous",o),s(E,"isColumnMajorString",l),s(E,"isComplexFloatingPointDataType",p),s(E,"isContiguous",j),s(E,"isDataType",y),s(E,"isFloatingPointDataType",b),s(E,"isIndexDataType",h),s(E,"isIndexMode",g),s(E,"isInputCastingPolicy",f),s(E,"isIntegerDataType",x),s(E,"isIntegerIndexDataType",c),s(E,"isMaskIndexDataType",v),s(E,"isMostlySafeDataTypeCast",u),s(E,"isNumericDataType",D),s(E,"isOrder",T),s(E,"isOutputDataTypePolicy",C),s(E,"isReadOnly",S),s(E,"isRealDataType",M),s(E,"isRealFloatingPointDataType",I),s(E,"isRowMajor",w),s(E,"isRowMajorContiguous",R),s(E,"isRowMajorString",P),s(E,"isSafeDataTypeCast",B),s(E,"isSameKindDataTypeCast",k),s(E,"isScalarMostlySafeCompatible",F),s(E,"isSignedIntegerDataType",O),s(E,"isSingleSegmentCompatible",q),s(E,"isStructDataType",L),s(E,"isUnsignedIntegerDataType",A);export{E as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..a122f1d --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nimport isInputCastingPolicy from '@stdlib/ndarray-base-assert-is-input-casting-policy';\nsetReadOnly( ns, 'isInputCastingPolicy', isInputCastingPolicy );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isStructDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-struct-data-type}\n*/\nimport isStructDataType from '@stdlib/ndarray-base-assert-is-struct-data-type';\nsetReadOnly( ns, 'isStructDataType', isStructDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isInputCastingPolicy","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isStructDataType","isUnsignedIntegerDataType"],"mappings":";;i9SAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,uBAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,sBAAAqB,GAUApB,EAAAD,EAAA,2BAAAsB,GAUArB,EAAAD,EAAA,oBAAAuB,GAUAtB,EAAAD,EAAA,UAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,aAAA0B,GAUAzB,EAAAD,EAAA,iBAAA2B,GAUA1B,EAAAD,EAAA,8BAAA4B,GAUA3B,EAAAD,EAAA,aAAA6B,GAUA5B,EAAAD,EAAA,uBAAA8B,GAUA7B,EAAAD,EAAA,mBAAA+B,GAUA9B,EAAAD,EAAA,qBAAAgC,GAUA/B,EAAAD,EAAA,yBAAAiC,GAUAhC,EAAAD,EAAA,+BAAAkC,GAUAjC,EAAAD,EAAA,0BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC,GAUAnC,EAAAD,EAAA,mBAAAqC,GAUApC,EAAAD,EAAA,4BAAAsC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index a28b3c0..0000000 --- a/lib/index.js +++ /dev/null @@ -1,375 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type} -*/ -setReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type} -*/ -setReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isInputCastingPolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy} -*/ -setReadOnly( ns, 'isInputCastingPolicy', require( '@stdlib/ndarray-base-assert-is-input-casting-policy' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isIntegerIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type} -*/ -setReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) ); - -/** -* @name isMaskIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type} -*/ -setReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isScalarMostlySafeCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible} -*/ -setReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isStructDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-struct-data-type} -*/ -setReadOnly( ns, 'isStructDataType', require( '@stdlib/ndarray-base-assert-is-struct-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index d86c972..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,104 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-boolean-index-data-type": "github:stdlib-js/ndarray-base-assert-is-boolean-index-data-type#main", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-data-type": "github:stdlib-js/ndarray-base-assert-is-index-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-input-casting-policy": "github:stdlib-js/ndarray-base-assert-is-input-casting-policy#main", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-index-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mask-index-data-type": "github:stdlib-js/ndarray-base-assert-is-mask-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible": "github:stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible#main", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-struct-data-type": "github:stdlib-js/ndarray-base-assert-is-struct-data-type#main", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-complex-like": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/complex-float64-ctor": "^0.0.3", - "@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main", - "@stdlib/dstructs-struct": "github:stdlib-js/dstructs-struct#main", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-min-signed-integer-dtype": "github:stdlib-js/ndarray-base-min-signed-integer-dtype#main", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-input-casting-policies": "github:stdlib-js/ndarray-input-casting-policies#main", - "@stdlib/ndarray-min-dtype": "^0.3.0", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..e06b17a --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 9287b9d6599871708bb9c9dbf5068838b0a062d6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 21 Jun 2025 03:48:57 +0000 Subject: [PATCH 178/183] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1a73b04..d86c972 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "@stdlib/ndarray-same-kind-casts": "^0.3.0", "@stdlib/random-base-discrete-uniform": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", From e8beecc00006c1a5c67dea2b6f090c4cf03ad935 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 21 Jun 2025 03:53:14 +0000 Subject: [PATCH 179/183] Remove files --- index.d.ts | 989 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5836 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a57db0d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,989 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isOutputDataTypePolicy = require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isScalarMostlySafeCompatible = require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an input value is a supported ndarray output data type policy. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray output data type policy - * - * @example - * var bool = ns.isOutputDataTypePolicy( 'boolean' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'real' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'numeric' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'foo' ); - * // returns false - */ - isOutputDataTypePolicy: typeof isOutputDataTypePolicy; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating whether a scalar value can be safely cast or, for floating-point data types, downcast to specified ndarray data type. - * - * @param value - scalar value - * @param dtype - ndarray data type - * @returns boolean indicating whether a scalar value can be safely cast - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.0, 'float64' ); - * // returns true - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.14, 'int32' ); - * // returns false - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( -1, 'uint32' ); - * // returns false - */ - isScalarMostlySafeCompatible: typeof isScalarMostlySafeCompatible; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index b85d8fe..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";export{default as isInputCastingPolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import L from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-struct-data-type@esm/index.mjs";export{default as isStructDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-struct-data-type@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var E={};s(E,"hasEqualShape",e),s(E,"isAllowedDataTypeCast",t),s(E,"isBooleanDataType",a),s(E,"isBooleanIndexDataType",r),s(E,"isBufferLengthCompatible",i),s(E,"isBufferLengthCompatibleShape",d),s(E,"isCastingMode",n),s(E,"isColumnMajor",m),s(E,"isColumnMajorContiguous",o),s(E,"isColumnMajorString",l),s(E,"isComplexFloatingPointDataType",p),s(E,"isContiguous",j),s(E,"isDataType",y),s(E,"isFloatingPointDataType",b),s(E,"isIndexDataType",h),s(E,"isIndexMode",g),s(E,"isInputCastingPolicy",f),s(E,"isIntegerDataType",x),s(E,"isIntegerIndexDataType",c),s(E,"isMaskIndexDataType",v),s(E,"isMostlySafeDataTypeCast",u),s(E,"isNumericDataType",D),s(E,"isOrder",T),s(E,"isOutputDataTypePolicy",C),s(E,"isReadOnly",S),s(E,"isRealDataType",M),s(E,"isRealFloatingPointDataType",I),s(E,"isRowMajor",w),s(E,"isRowMajorContiguous",R),s(E,"isRowMajorString",P),s(E,"isSafeDataTypeCast",B),s(E,"isSameKindDataTypeCast",k),s(E,"isScalarMostlySafeCompatible",F),s(E,"isSignedIntegerDataType",O),s(E,"isSingleSegmentCompatible",q),s(E,"isStructDataType",L),s(E,"isUnsignedIntegerDataType",A);export{E as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index a122f1d..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nimport isInputCastingPolicy from '@stdlib/ndarray-base-assert-is-input-casting-policy';\nsetReadOnly( ns, 'isInputCastingPolicy', isInputCastingPolicy );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isStructDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-struct-data-type}\n*/\nimport isStructDataType from '@stdlib/ndarray-base-assert-is-struct-data-type';\nsetReadOnly( ns, 'isStructDataType', isStructDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isInputCastingPolicy","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isStructDataType","isUnsignedIntegerDataType"],"mappings":";;i9SAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,uBAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,sBAAAqB,GAUApB,EAAAD,EAAA,2BAAAsB,GAUArB,EAAAD,EAAA,oBAAAuB,GAUAtB,EAAAD,EAAA,UAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,aAAA0B,GAUAzB,EAAAD,EAAA,iBAAA2B,GAUA1B,EAAAD,EAAA,8BAAA4B,GAUA3B,EAAAD,EAAA,aAAA6B,GAUA5B,EAAAD,EAAA,uBAAA8B,GAUA7B,EAAAD,EAAA,mBAAA+B,GAUA9B,EAAAD,EAAA,qBAAAgC,GAUA/B,EAAAD,EAAA,yBAAAiC,GAUAhC,EAAAD,EAAA,+BAAAkC,GAUAjC,EAAAD,EAAA,0BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC,GAUAnC,EAAAD,EAAA,mBAAAqC,GAUApC,EAAAD,EAAA,4BAAAsC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index e06b17a..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From 094a8a2ca2daa7027d41e3e3bddb30c84a8db418 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 21 Jun 2025 03:54:10 +0000 Subject: [PATCH 180/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 442 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 117 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 375 -- package.json | 124 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4906 insertions(+), 4482 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -158,7 +155,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -223,79 +220,79 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type +[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type +[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-input-casting-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-input-casting-policy +[@stdlib/ndarray/base/assert/is-input-casting-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-input-casting-policy/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type +[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type +[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible +[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-struct-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-struct-data-type +[@stdlib/ndarray/base/assert/is-struct-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-struct-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index f75f9ba..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBooleanIndexDataType",require('@stdlib/ndarray-base-assert-is-boolean-index-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexDataType",require('@stdlib/ndarray-base-assert-is-index-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isInputCastingPolicy",require('@stdlib/ndarray-base-assert-is-input-casting-policy/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isIntegerIndexDataType",require('@stdlib/ndarray-base-assert-is-integer-index-data-type/dist'));i(e,"isMaskIndexDataType",require('@stdlib/ndarray-base-assert-is-mask-index-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isScalarMostlySafeCompatible",require('@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isStructDataType",require('@stdlib/ndarray-base-assert-is-struct-data-type/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 92bade6..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nsetReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nsetReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nsetReadOnly( ns, 'isInputCastingPolicy', require( '@stdlib/ndarray-base-assert-is-input-casting-policy' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nsetReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nsetReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isStructDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-struct-data-type}\n*/\nsetReadOnly( ns, 'isStructDataType', require( '@stdlib/ndarray-base-assert-is-struct-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,kBAAmB,QAAS,gDAAiD,CAAE,EAShGD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,sBAAuB,QAAS,qDAAsD,CAAE,EASzGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,+BAAgC,QAAS,8DAA+D,CAAE,EAS3HD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..b85d8fe --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";export{default as isInputCastingPolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import L from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-struct-data-type@esm/index.mjs";export{default as isStructDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-struct-data-type@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var E={};s(E,"hasEqualShape",e),s(E,"isAllowedDataTypeCast",t),s(E,"isBooleanDataType",a),s(E,"isBooleanIndexDataType",r),s(E,"isBufferLengthCompatible",i),s(E,"isBufferLengthCompatibleShape",d),s(E,"isCastingMode",n),s(E,"isColumnMajor",m),s(E,"isColumnMajorContiguous",o),s(E,"isColumnMajorString",l),s(E,"isComplexFloatingPointDataType",p),s(E,"isContiguous",j),s(E,"isDataType",y),s(E,"isFloatingPointDataType",b),s(E,"isIndexDataType",h),s(E,"isIndexMode",g),s(E,"isInputCastingPolicy",f),s(E,"isIntegerDataType",x),s(E,"isIntegerIndexDataType",c),s(E,"isMaskIndexDataType",v),s(E,"isMostlySafeDataTypeCast",u),s(E,"isNumericDataType",D),s(E,"isOrder",T),s(E,"isOutputDataTypePolicy",C),s(E,"isReadOnly",S),s(E,"isRealDataType",M),s(E,"isRealFloatingPointDataType",I),s(E,"isRowMajor",w),s(E,"isRowMajorContiguous",R),s(E,"isRowMajorString",P),s(E,"isSafeDataTypeCast",B),s(E,"isSameKindDataTypeCast",k),s(E,"isScalarMostlySafeCompatible",F),s(E,"isSignedIntegerDataType",O),s(E,"isSingleSegmentCompatible",q),s(E,"isStructDataType",L),s(E,"isUnsignedIntegerDataType",A);export{E as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..a122f1d --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nimport isInputCastingPolicy from '@stdlib/ndarray-base-assert-is-input-casting-policy';\nsetReadOnly( ns, 'isInputCastingPolicy', isInputCastingPolicy );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isStructDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-struct-data-type}\n*/\nimport isStructDataType from '@stdlib/ndarray-base-assert-is-struct-data-type';\nsetReadOnly( ns, 'isStructDataType', isStructDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isInputCastingPolicy","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isStructDataType","isUnsignedIntegerDataType"],"mappings":";;i9SAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,uBAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,sBAAAqB,GAUApB,EAAAD,EAAA,2BAAAsB,GAUArB,EAAAD,EAAA,oBAAAuB,GAUAtB,EAAAD,EAAA,UAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,aAAA0B,GAUAzB,EAAAD,EAAA,iBAAA2B,GAUA1B,EAAAD,EAAA,8BAAA4B,GAUA3B,EAAAD,EAAA,aAAA6B,GAUA5B,EAAAD,EAAA,uBAAA8B,GAUA7B,EAAAD,EAAA,mBAAA+B,GAUA9B,EAAAD,EAAA,qBAAAgC,GAUA/B,EAAAD,EAAA,yBAAAiC,GAUAhC,EAAAD,EAAA,+BAAAkC,GAUAjC,EAAAD,EAAA,0BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC,GAUAnC,EAAAD,EAAA,mBAAAqC,GAUApC,EAAAD,EAAA,4BAAAsC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index a28b3c0..0000000 --- a/lib/index.js +++ /dev/null @@ -1,375 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type} -*/ -setReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type} -*/ -setReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isInputCastingPolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy} -*/ -setReadOnly( ns, 'isInputCastingPolicy', require( '@stdlib/ndarray-base-assert-is-input-casting-policy' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isIntegerIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type} -*/ -setReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) ); - -/** -* @name isMaskIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type} -*/ -setReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isScalarMostlySafeCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible} -*/ -setReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isStructDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-struct-data-type} -*/ -setReadOnly( ns, 'isStructDataType', require( '@stdlib/ndarray-base-assert-is-struct-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index d86c972..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,104 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-boolean-index-data-type": "github:stdlib-js/ndarray-base-assert-is-boolean-index-data-type#main", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-data-type": "github:stdlib-js/ndarray-base-assert-is-index-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-input-casting-policy": "github:stdlib-js/ndarray-base-assert-is-input-casting-policy#main", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-index-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mask-index-data-type": "github:stdlib-js/ndarray-base-assert-is-mask-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible": "github:stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible#main", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-struct-data-type": "github:stdlib-js/ndarray-base-assert-is-struct-data-type#main", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-complex-like": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/complex-float64-ctor": "^0.0.3", - "@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main", - "@stdlib/dstructs-struct": "github:stdlib-js/dstructs-struct#main", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-min-signed-integer-dtype": "github:stdlib-js/ndarray-base-min-signed-integer-dtype#main", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-input-casting-policies": "github:stdlib-js/ndarray-input-casting-policies#main", - "@stdlib/ndarray-min-dtype": "^0.3.0", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..e06b17a --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -}); From 3a645ebf960cc7c7b792da1a630a79898b3b34b6 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 28 Jun 2025 08:04:52 +0000 Subject: [PATCH 181/183] Transform error messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bd9eead..5744407 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "@stdlib/ndarray-same-kind-casts": "^0.3.0", "@stdlib/random-base-discrete-uniform": "^0.2.1", "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-keys": "^0.2.2", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", From c70d75954d19fd7d30034e58118aa68cd76c9ba4 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 28 Jun 2025 08:12:31 +0000 Subject: [PATCH 182/183] Remove files --- index.d.ts | 989 ---------- index.mjs | 4 - index.mjs.map | 1 - stats.html | 4842 ------------------------------------------------- 4 files changed, 5836 deletions(-) delete mode 100644 index.d.ts delete mode 100644 index.mjs delete mode 100644 index.mjs.map delete mode 100644 stats.html diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index a57db0d..0000000 --- a/index.d.ts +++ /dev/null @@ -1,989 +0,0 @@ -/* -* @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. -*/ - -// TypeScript Version: 4.1 - -/* eslint-disable max-lines */ - -import hasEqualShape = require( '@stdlib/ndarray-base-assert-has-equal-shape' ); -import isAllowedDataTypeCast = require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ); -import isBooleanDataType = require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ); -import isBufferLengthCompatible = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ); -import isBufferLengthCompatibleShape = require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ); -import isCastingMode = require( '@stdlib/ndarray-base-assert-is-casting-mode' ); -import isColumnMajor = require( '@stdlib/ndarray-base-assert-is-column-major' ); -import isColumnMajorContiguous = require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ); -import isColumnMajorString = require( '@stdlib/ndarray-base-assert-is-column-major-string' ); -import isComplexFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ); -import isContiguous = require( '@stdlib/ndarray-base-assert-is-contiguous' ); -import isDataType = require( '@stdlib/ndarray-base-assert-is-data-type' ); -import isFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ); -import isIndexMode = require( '@stdlib/ndarray-base-assert-is-index-mode' ); -import isIntegerDataType = require( '@stdlib/ndarray-base-assert-is-integer-data-type' ); -import isMostlySafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ); -import isNumericDataType = require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ); -import isOrder = require( '@stdlib/ndarray-base-assert-is-order' ); -import isOutputDataTypePolicy = require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ); -import isReadOnly = require( '@stdlib/ndarray-base-assert-is-read-only' ); -import isRealDataType = require( '@stdlib/ndarray-base-assert-is-real-data-type' ); -import isRealFloatingPointDataType = require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ); -import isRowMajor = require( '@stdlib/ndarray-base-assert-is-row-major' ); -import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ); -import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' ); -import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ); -import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ); -import isScalarMostlySafeCompatible = require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ); -import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ); -import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ); -import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ); - -/** -* Interface describing the `assert` namespace. -*/ -interface Namespace { - /** - * Tests whether two ndarrays have the same shape. - * - * @param x - first input ndarray - * @param y - second input ndarray - * @returns boolean indicating whether two ndarrays have the same shape - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ] ); - * var y = array( [ [ 5, 6 ], [ 7, 8 ] ] ); - * - * var bool = ns.hasEqualShape( x, y ); - * // returns true - */ - hasEqualShape: typeof hasEqualShape; - - /** - * Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @param casting - ndarray casting mode - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isAllowedDataTypeCast( 'float32', 'float64', 'safe' ); - * // returns true - * - * bool = ns.isAllowedDataTypeCast( 'float64', 'int32', 'safe' ); - * // returns false - */ - isAllowedDataTypeCast: typeof isAllowedDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray boolean data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray boolean data type - * - * @example - * var bool = ns.isBooleanDataType( 'binary' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'bool' ); - * // returns true - * - * bool = ns.isBooleanDataType( 'float32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'float64' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'generic' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'int8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint16' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint32' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isBooleanDataType( 'foo' ); - * // returns false - */ - isBooleanDataType: typeof isBooleanDataType; - - /** - * Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data. - * - * @param len - buffer length - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if a buffer length is compatible - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 2; - * - * var bool = ns.isBufferLengthCompatible( 4, shape, strides, offset ); - * // returns false - */ - isBufferLengthCompatible: typeof isBufferLengthCompatible; - - /** - * Returns a boolean indicating if a buffer length is compatible with a provided shape array. - * - * @param len - buffer length - * @param shape - array shape - * @returns boolean indicating if a buffer length is compatible with a provided shape array - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 4, shape ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * - * var bool = ns.isBufferLengthCompatibleShape( 3, shape ); - * // returns false - */ - isBufferLengthCompatibleShape: typeof isBufferLengthCompatibleShape; - - /** - * Tests whether an input value is a supported ndarray casting mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray casting mode - * - * @example - * var bool = ns.isCastingMode( 'none' ); - * // returns true - * - * bool = ns.isCastingMode( 'equiv' ); - * // returns true - * - * bool = ns.isCastingMode( 'safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'mostly-safe' ); - * // returns true - * - * bool = ns.isCastingMode( 'same-kind' ); - * // returns true - * - * bool = ns.isCastingMode( 'unsafe' ); - * // returns true - * - * bool = ns.isCastingMode( 'foo' ); - * // returns false - */ - isCastingMode: typeof isCastingMode; - - /** - * Returns a boolean indicating if an array is column-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is column-major - * - * @example - * var bool = ns.isColumnMajor( [ 1, 2 ] ); - * // returns true - * - * bool = ns.isColumnMajor( [ 2, 1 ] ); - * // returns false - */ - isColumnMajor: typeof isColumnMajor; - - /** - * Returns a boolean indicating if an array is column-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is column-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 1, -2 ]; - * var offset = 2; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isColumnMajorContiguous( shape, strides, offset ); - * // returns false - */ - isColumnMajorContiguous: typeof isColumnMajorContiguous; - - /** - * Tests whether an input value is the string representing column-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isColumnMajorString( 'column-major' ); - * // returns true - * - * bool = ns.isColumnMajorString( 'row-major' ); - * // returns false - * - * bool = ns.isColumnMajorString( 'foo' ); - * // returns false - */ - isColumnMajorString: typeof isColumnMajorString; - - /** - * Tests whether an input value is a supported ndarray complex-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type - * - * @example - * var bool = ns.isComplexFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'complex64' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'complex128' ); - * // returns true - * - * bool = ns.isComplexFloatingPointDataType( 'float32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'float64' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isComplexFloatingPointDataType( 'foo' ); - * // returns false - */ - isComplexFloatingPointDataType: typeof isComplexFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isContiguous( shape, strides, offset ); - * // returns false - */ - isContiguous: typeof isContiguous; - - /** - * Tests whether an input value is a supported ndarray data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray data type - * - * @example - * var bool = ns.isDataType( 'binary' ); - * // returns true - * - * bool = ns.isDataType( 'float32' ); - * // returns true - * - * bool = ns.isDataType( 'float64' ); - * // returns true - * - * bool = ns.isDataType( 'generic' ); - * // returns true - * - * bool = ns.isDataType( 'int16' ); - * // returns true - * - * bool = ns.isDataType( 'int32' ); - * // returns true - * - * bool = ns.isDataType( 'int8' ); - * // returns true - * - * bool = ns.isDataType( 'uint16' ); - * // returns true - * - * bool = ns.isDataType( 'uint32' ); - * // returns true - * - * bool = ns.isDataType( 'uint8' ); - * // returns true - * - * bool = ns.isDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isDataType( 'foo' ); - * // returns false - */ - isDataType: typeof isDataType; - - /** - * Tests whether an input value is a supported ndarray floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray floating-point data type - * - * @example - * var bool = ns.isFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isFloatingPointDataType( 'foo' ); - * // returns false - */ - isFloatingPointDataType: typeof isFloatingPointDataType; - - /** - * Tests whether an input value is a supported ndarray index mode. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray index mode - * - * @example - * var bool = ns.isIndexMode( 'wrap' ); - * // returns true - * - * bool = ns.isIndexMode( 'clamp' ); - * // returns true - * - * bool = ns.isIndexMode( 'throw' ); - * // returns true - * - * bool = ns.isIndexMode( 'foo' ); - * // returns false - */ - isIndexMode: typeof isIndexMode; - - /** - * Tests whether an input value is a supported ndarray integer (i.e., signed or unsigned integer) data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray integer data type - * - * @example - * var bool = ns.isIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isIntegerDataType( 'foo' ); - * // returns false - */ - isIntegerDataType: typeof isIntegerDataType; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast or, for floating-point data types, downcast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isMostlySafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isMostlySafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isMostlySafeDataTypeCast: typeof isMostlySafeDataTypeCast; - - /** - * Tests whether an input value is a supported ndarray numeric data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray numeric data type - * - * @example - * var bool = ns.isNumericDataType( 'binary' ); - * // returns false - * - * bool = ns.isNumericDataType( 'float32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'float64' ); - * // returns true - * - * bool = ns.isNumericDataType( 'generic' ); - * // returns false - * - * bool = ns.isNumericDataType( 'int16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'int8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint16' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint32' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8' ); - * // returns true - * - * bool = ns.isNumericDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isNumericDataType( 'foo' ); - * // returns false - */ - isNumericDataType: typeof isNumericDataType; - - /** - * Tests whether an input value is an ndarray order. - * - * @param v - value to test - * @returns boolean indicating whether an input value is an ndarray order - * - * @example - * var bool = ns.isOrder( 'row-major' ); - * // returns true - * - * bool = ns.isOrder( 'column-major' ); - * // returns true - * - * bool = ns.isOrder( 'foo' ); - * // returns false - */ - isOrder: typeof isOrder; - - /** - * Tests whether an input value is a supported ndarray output data type policy. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray output data type policy - * - * @example - * var bool = ns.isOutputDataTypePolicy( 'boolean' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'real' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'numeric' ); - * // returns true - * - * bool = ns.isOutputDataTypePolicy( 'foo' ); - * // returns false - */ - isOutputDataTypePolicy: typeof isOutputDataTypePolicy; - - /** - * Tests whether an ndarray is read-only. - * - * @param arr - input ndarray - * @returns boolean indicating whether an ndarray is read-only - * - * @example - * var array = require( '@stdlib/ndarray-array' ); - * - * var x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': true - * }); - * var bool = ns.isReadOnly( x ); - * // returns true - * - * x = array( [ [ 1, 2 ], [ 3, 4 ] ], { - * 'readonly': false - * }); - * bool = ns.isReadOnly( x ); - * // returns false - */ - isReadOnly: typeof isReadOnly; - - /** - * Tests whether an input value is a supported ndarray real-valued data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued data type - * - * @example - * var bool = ns.isRealDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealDataType( 'complex128' ); - * // returns false - * - * bool = ns.isRealDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealDataType( 'int16' ); - * // returns true - * - * bool = ns.isRealDataType( 'int32' ); - * // returns true - * - * bool = ns.isRealDataType( 'int8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint16' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint32' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8' ); - * // returns true - * - * bool = ns.isRealDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isRealDataType( 'foo' ); - * // returns false - */ - isRealDataType: typeof isRealDataType; - - /** - * Tests whether an input value is a supported ndarray real-valued floating-point data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray real-valued floating-point data type - * - * @example - * var bool = ns.isRealFloatingPointDataType( 'binary' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'float32' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'float64' ); - * // returns true - * - * bool = ns.isRealFloatingPointDataType( 'generic' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'int8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint16' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint32' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isRealFloatingPointDataType( 'foo' ); - * // returns false - */ - isRealFloatingPointDataType: typeof isRealFloatingPointDataType; - - /** - * Returns a boolean indicating if an array is row-major based on a provided stride array. - * - * @param strides - integer stride array - * @returns boolean indicating if an array is row-major - * - * @example - * var bool = ns.isRowMajor( [ 2, 1 ] ); - * // returns true - * - * bool = ns.isRowMajor( [ 1, 2 ] ); - * // returns false - */ - isRowMajor: typeof isRowMajor; - - /** - * Returns a boolean indicating if an array is row-major contiguous. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is row-major contiguous - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ -2, 1 ]; - * var offset = 2; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 2 ]; - * var offset = 0; - * - * var bool = ns.isRowMajorContiguous( shape, strides, offset ); - * // returns false - */ - isRowMajorContiguous: typeof isRowMajorContiguous; - - /** - * Tests whether an input value is the string representing row-major order. - * - * @param v - value to test - * @returns boolean result - * - * @example - * var bool = ns.isRowMajorString( 'row-major' ); - * // returns true - * - * bool = ns.isRowMajorString( 'column-major' ); - * // returns false - * - * bool = ns.isRowMajorString( 'foo' ); - * // returns false - */ - isRowMajorString: typeof isRowMajorString; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be safely cast to another data type - * - * @example - * var bool = ns.isSafeDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSafeDataTypeCast( 'float64', 'int32' ); - * // returns false - */ - isSafeDataTypeCast: typeof isSafeDataTypeCast; - - /** - * Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same "kind" as, another ndarray data type. - * - * @param from - ndarray data type - * @param to - ndarray data type - * @returns boolean indicating if a data type can be cast to another data type - * - * @example - * var bool = ns.isSameKindDataTypeCast( 'float32', 'float64' ); - * // returns true - * - * bool = ns.isSameKindDataTypeCast( 'uint16', 'int16' ); - * // returns false - */ - isSameKindDataTypeCast: typeof isSameKindDataTypeCast; - - /** - * Returns a boolean indicating whether a scalar value can be safely cast or, for floating-point data types, downcast to specified ndarray data type. - * - * @param value - scalar value - * @param dtype - ndarray data type - * @returns boolean indicating whether a scalar value can be safely cast - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.0, 'float64' ); - * // returns true - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( 3.14, 'int32' ); - * // returns false - * - * @example - * var bool = ns.isScalarMostlySafeCompatible( -1, 'uint32' ); - * // returns false - */ - isScalarMostlySafeCompatible: typeof isScalarMostlySafeCompatible; - - /** - * Tests whether an input value is a supported ndarray signed integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray signed integer data type - * - * @example - * var bool = ns.isSignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'int16' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int32' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'int8' ); - * // returns true - * - * bool = ns.isSignedIntegerDataType( 'uint16' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint32' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'uint8c' ); - * // returns false - * - * bool = ns.isSignedIntegerDataType( 'foo' ); - * // returns false - */ - isSignedIntegerDataType: typeof isSignedIntegerDataType; - - /** - * Returns a boolean indicating if an array is compatible with a single memory segment. - * - * @param shape - array shape - * @param strides - stride array - * @param offset - index offset - * @returns boolean indicating if an array is compatible with a single memory segment - * - * @example - * var shape = [ 2, 2 ]; - * var strides = [ 2, 1 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns true - * - * @example - * var shape = [ 10 ]; - * var strides = [ 3 ]; - * var offset = 0; - * - * var bool = ns.isSingleSegmentCompatible( shape, strides, offset ); - * // returns false - */ - isSingleSegmentCompatible: typeof isSingleSegmentCompatible; - - /** - * Tests whether an input value is a supported ndarray unsigned integer data type. - * - * @param v - value to test - * @returns boolean indicating whether an input value is a supported ndarray unsigned integer data type - * - * @example - * var bool = ns.isUnsignedIntegerDataType( 'binary' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'float64' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'generic' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int16' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int32' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'int8' ); - * // returns false - * - * bool = ns.isUnsignedIntegerDataType( 'uint16' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint32' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'uint8c' ); - * // returns true - * - * bool = ns.isUnsignedIntegerDataType( 'foo' ); - * // returns false - */ - isUnsignedIntegerDataType: typeof isUnsignedIntegerDataType; -} - -/** -* Base ndarray assertion utilities. -*/ -declare var ns: Namespace; - - -// EXPORTS // - -export = ns; diff --git a/index.mjs b/index.mjs deleted file mode 100644 index b85d8fe..0000000 --- a/index.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 -/// -import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";export{default as isInputCastingPolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import L from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-struct-data-type@esm/index.mjs";export{default as isStructDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-struct-data-type@esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var E={};s(E,"hasEqualShape",e),s(E,"isAllowedDataTypeCast",t),s(E,"isBooleanDataType",a),s(E,"isBooleanIndexDataType",r),s(E,"isBufferLengthCompatible",i),s(E,"isBufferLengthCompatibleShape",d),s(E,"isCastingMode",n),s(E,"isColumnMajor",m),s(E,"isColumnMajorContiguous",o),s(E,"isColumnMajorString",l),s(E,"isComplexFloatingPointDataType",p),s(E,"isContiguous",j),s(E,"isDataType",y),s(E,"isFloatingPointDataType",b),s(E,"isIndexDataType",h),s(E,"isIndexMode",g),s(E,"isInputCastingPolicy",f),s(E,"isIntegerDataType",x),s(E,"isIntegerIndexDataType",c),s(E,"isMaskIndexDataType",v),s(E,"isMostlySafeDataTypeCast",u),s(E,"isNumericDataType",D),s(E,"isOrder",T),s(E,"isOutputDataTypePolicy",C),s(E,"isReadOnly",S),s(E,"isRealDataType",M),s(E,"isRealFloatingPointDataType",I),s(E,"isRowMajor",w),s(E,"isRowMajorContiguous",R),s(E,"isRowMajorString",P),s(E,"isSafeDataTypeCast",B),s(E,"isSameKindDataTypeCast",k),s(E,"isScalarMostlySafeCompatible",F),s(E,"isSignedIntegerDataType",O),s(E,"isSingleSegmentCompatible",q),s(E,"isStructDataType",L),s(E,"isUnsignedIntegerDataType",A);export{E as default}; -//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map deleted file mode 100644 index a122f1d..0000000 --- a/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nimport isInputCastingPolicy from '@stdlib/ndarray-base-assert-is-input-casting-policy';\nsetReadOnly( ns, 'isInputCastingPolicy', isInputCastingPolicy );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isStructDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-struct-data-type}\n*/\nimport isStructDataType from '@stdlib/ndarray-base-assert-is-struct-data-type';\nsetReadOnly( ns, 'isStructDataType', isStructDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isFloatingPointDataType","isIndexDataType","isIndexMode","isInputCastingPolicy","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isStructDataType","isUnsignedIntegerDataType"],"mappings":";;i9SAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,0BAAAe,GAUAd,EAAAD,EAAA,kBAAAgB,GAUAf,EAAAD,EAAA,cAAAiB,GAUAhB,EAAAD,EAAA,uBAAAkB,GAUAjB,EAAAD,EAAA,oBAAAmB,GAUAlB,EAAAD,EAAA,yBAAAoB,GAUAnB,EAAAD,EAAA,sBAAAqB,GAUApB,EAAAD,EAAA,2BAAAsB,GAUArB,EAAAD,EAAA,oBAAAuB,GAUAtB,EAAAD,EAAA,UAAAwB,GAUAvB,EAAAD,EAAA,yBAAAyB,GAUAxB,EAAAD,EAAA,aAAA0B,GAUAzB,EAAAD,EAAA,iBAAA2B,GAUA1B,EAAAD,EAAA,8BAAA4B,GAUA3B,EAAAD,EAAA,aAAA6B,GAUA5B,EAAAD,EAAA,uBAAA8B,GAUA7B,EAAAD,EAAA,mBAAA+B,GAUA9B,EAAAD,EAAA,qBAAAgC,GAUA/B,EAAAD,EAAA,yBAAAiC,GAUAhC,EAAAD,EAAA,+BAAAkC,GAUAjC,EAAAD,EAAA,0BAAAmC,GAUAlC,EAAAD,EAAA,4BAAAoC,GAUAnC,EAAAD,EAAA,mBAAAqC,GAUApC,EAAAD,EAAA,4BAAAsC"} \ No newline at end of file diff --git a/stats.html b/stats.html deleted file mode 100644 index e06b17a..0000000 --- a/stats.html +++ /dev/null @@ -1,4842 +0,0 @@ - - - - - - - - Rollup Visualizer - - - -
- - - - - From bbeceb62539423731208c0dea45cdcd52acb1a05 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 28 Jun 2025 08:13:49 +0000 Subject: [PATCH 183/183] Auto-generated commit --- .editorconfig | 180 - .eslintrc.js | 1 - .gitattributes | 66 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/workflows/benchmark.yml | 64 - .github/workflows/cancel.yml | 57 - .github/workflows/close_pull_requests.yml | 54 - .github/workflows/examples.yml | 64 - .github/workflows/npm_downloads.yml | 112 - .github/workflows/productionize.yml | 794 --- .github/workflows/publish.yml | 252 - .github/workflows/test.yml | 99 - .github/workflows/test_bundles.yml | 186 - .github/workflows/test_coverage.yml | 133 - .github/workflows/test_install.yml | 85 - .github/workflows/test_published_package.yml | 105 - .gitignore | 194 - .npmignore | 229 - .npmrc | 31 - CHANGELOG.md | 446 -- CITATION.cff | 30 - CODE_OF_CONDUCT.md | 3 - CONTRIBUTING.md | 3 - Makefile | 534 -- README.md | 117 +- SECURITY.md | 5 - branches.md | 56 - dist/index.d.ts | 3 - dist/index.js | 3 - dist/index.js.map | 7 - docs/types/test.ts | 29 - examples/index.js | 24 - docs/types/index.d.ts => index.d.ts | 0 index.mjs | 4 + index.mjs.map | 1 + lib/index.js | 384 -- package.json | 125 +- stats.html | 4842 ++++++++++++++++++ test/dist/test.js | 33 - test/test.js | 40 - 40 files changed, 4906 insertions(+), 4496 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc.js delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/close_pull_requests.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/npm_downloads.yml delete mode 100644 .github/workflows/productionize.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/test_bundles.yml delete mode 100644 .github/workflows/test_coverage.yml delete mode 100644 .github/workflows/test_install.yml delete mode 100644 .github/workflows/test_published_package.yml delete mode 100644 .gitignore delete mode 100644 .npmignore delete mode 100644 .npmrc delete mode 100644 CHANGELOG.md delete mode 100644 CITATION.cff delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 Makefile delete mode 100644 SECURITY.md delete mode 100644 branches.md delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 docs/types/test.ts delete mode 100644 examples/index.js rename docs/types/index.d.ts => index.d.ts (100%) create mode 100644 index.mjs create mode 100644 index.mjs.map delete mode 100644 lib/index.js create mode 100644 stats.html delete mode 100644 test/dist/test.js delete mode 100644 test/test.js diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index dab5d2a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,180 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# EditorConfig configuration file (see ). - -# Indicate that this file is a root-level configuration file: -root = true - -# Set properties for all files: -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# Set properties for JavaScript files: -[*.{js,js.txt}] -indent_style = tab - -# Set properties for JavaScript ES module files: -[*.{mjs,mjs.txt}] -indent_style = tab - -# Set properties for JavaScript CommonJS files: -[*.{cjs,cjs.txt}] -indent_style = tab - -# Set properties for JSON files: -[*.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `cli_opts.json` files: -[cli_opts.json] -indent_style = tab - -# Set properties for TypeScript files: -[*.ts] -indent_style = tab - -# Set properties for Python files: -[*.{py,py.txt}] -indent_style = space -indent_size = 4 - -# Set properties for Julia files: -[*.{jl,jl.txt}] -indent_style = tab - -# Set properties for R files: -[*.{R,R.txt}] -indent_style = tab - -# Set properties for C files: -[*.{c,c.txt}] -indent_style = tab - -# Set properties for C header files: -[*.{h,h.txt}] -indent_style = tab - -# Set properties for C++ files: -[*.{cpp,cpp.txt}] -indent_style = tab - -# Set properties for C++ header files: -[*.{hpp,hpp.txt}] -indent_style = tab - -# Set properties for Fortran files: -[*.{f,f.txt}] -indent_style = space -indent_size = 2 - -# Set properties for shell files: -[*.{sh,sh.txt}] -indent_style = tab - -# Set properties for AWK files: -[*.{awk,awk.txt}] -indent_style = tab - -# Set properties for HTML files: -[*.{html,html.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for XML files: -[*.{xml,xml.txt}] -indent_style = tab -tab_width = 2 - -# Set properties for CSS files: -[*.{css,css.txt}] -indent_style = tab - -# Set properties for Makefiles: -[Makefile] -indent_style = tab - -[*.{mk,mk.txt}] -indent_style = tab - -# Set properties for Markdown files: -[*.{md,md.txt}] -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. - -# Set properties for `usage.txt` files: -[usage.txt] -indent_style = space -indent_size = 2 - -# Set properties for `repl.txt` files: -[repl.txt] -indent_style = space -indent_size = 4 - -# Set properties for `package.json` files: -[package.{json,json.txt}] -indent_style = space -indent_size = 2 - -# Set properties for `datapackage.json` files: -[datapackage.json] -indent_style = space -indent_size = 2 - -# Set properties for `manifest.json` files: -[manifest.json] -indent_style = space -indent_size = 2 - -# Set properties for `tsconfig.json` files: -[tsconfig.json] -indent_style = space -indent_size = 2 - -# Set properties for LaTeX files: -[*.{tex,tex.txt}] -indent_style = tab - -# Set properties for LaTeX Bibliography files: -[*.{bib,bib.txt}] -indent_style = tab - -# Set properties for YAML files: -[*.{yml,yml.txt}] -indent_style = space -indent_size = 2 - -# Set properties for GYP files: -[binding.gyp] -indent_style = space -indent_size = 2 - -[*.gypi] -indent_style = space -indent_size = 2 - -# Set properties for citation files: -[*.{cff,cff.txt}] -indent_style = space -indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f30286..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -/* For the `eslint` rules of this project, consult the main repository at https://github.com/stdlib-js/stdlib */ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1c88e69..0000000 --- a/.gitattributes +++ /dev/null @@ -1,66 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 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. -#/ - -# Configuration file which assigns attributes to pathnames. -# -# [1]: https://git-scm.com/docs/gitattributes - -# Automatically normalize the line endings of any committed text files: -* text=auto - -# Override line endings for certain files on checkout: -*.crlf.csv text eol=crlf - -# Denote that certain files are binary and should not be modified: -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.mp3 binary -*.mp4 binary -*.mov binary - -# Override what is considered "vendored" by GitHub's linguist: -/lib/node_modules/** -linguist-vendored -linguist-generated - -# Configure directories which should *not* be included in GitHub language statistics: -/deps/** linguist-vendored -/dist/** linguist-generated -/workshops/** linguist-vendored - -benchmark/** linguist-vendored -docs/* linguist-documentation -etc/** linguist-vendored -examples/** linguist-documentation -scripts/** linguist-vendored -test/** linguist-vendored -tools/** linguist-vendored - -# Configure files which should *not* be included in GitHub language statistics: -Makefile linguist-vendored -*.mk linguist-vendored -*.jl linguist-vendored -*.py linguist-vendored -*.R linguist-vendored - -# Configure files which should be included in GitHub language statistics: -docs/types/*.d.ts -linguist-documentation diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 29e685f..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - - -We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. - -If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib. - -We look forward to receiving your contribution! :smiley: \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index e4f10fe..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: benchmark - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run benchmarks: - benchmark: - - # Define a display name: - name: 'Run benchmarks' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run benchmarks: - - name: 'Run benchmarks' - run: | - npm run benchmark diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index b5291db..0000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,57 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: cancel - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to cancel existing workflow runs: - cancel: - - # Define a display name: - name: 'Cancel workflow runs' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Time limit: - timeout-minutes: 3 - - # Define the sequence of job steps... - steps: - - # Cancel existing workflow runs: - - name: 'Cancel existing workflow runs' - # Pin action to full length commit SHA - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 - with: - workflow_id: >- - benchmark.yml, - examples.yml, - test.yml, - test_coverage.yml, - test_install.yml, - publish.yml - access_token: ${{ github.token }} diff --git a/.github/workflows/close_pull_requests.yml b/.github/workflows/close_pull_requests.yml deleted file mode 100644 index 1a01b3b..0000000 --- a/.github/workflows/close_pull_requests.yml +++ /dev/null @@ -1,54 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: close_pull_requests - -# Workflow triggers: -on: - pull_request_target: - types: [opened] - -# Workflow jobs: -jobs: - - # Define job to close all pull requests: - run: - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Close pull request - - name: 'Close pull request' - # Pin action to full length commit SHA corresponding to v3.1.2 - uses: superbrothers/close-pull-request@9c18513d320d7b2c7185fb93396d0c664d5d8448 - with: - comment: | - Thank you for submitting a pull request. :raised_hands: - - We greatly appreciate your willingness to submit a contribution. However, we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). - - We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert) of the main repository where we’ll review and provide feedback. If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. - - Thank you again, and we look forward to receiving your contribution! :smiley: - - Best, - The stdlib team \ No newline at end of file diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 2984901..0000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,64 +0,0 @@ -#/ -# @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. -#/ - -# Workflow name: -name: examples - -# Workflow triggers: -on: - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job to run the package examples... - examples: - - # Define display name: - name: 'Run examples' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - - # Checkout repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Run examples: - - name: 'Run examples' - run: | - npm run examples diff --git a/.github/workflows/npm_downloads.yml b/.github/workflows/npm_downloads.yml deleted file mode 100644 index 9a773f9..0000000 --- a/.github/workflows/npm_downloads.yml +++ /dev/null @@ -1,112 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: npm_downloads - -# Workflow triggers: -on: - # Run this workflow weekly: - schedule: - # cron: ' ' - - cron: '52 4 * * 6' - - # Allow the workflow to be manually run: - workflow_dispatch: - -# Workflow jobs: -jobs: - - # Define a job for retrieving npm download counts... - npm_downloads: - - # Define display name: - name: 'Retrieve npm download counts' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - timeout-minutes: 10 - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Resolve package name: - - name: 'Resolve package name' - id: package_name - run: | - name=`node -e 'console.log(require("./package.json").name)' | tr -d '\n'` - echo "package_name=$name" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Fetch download data: - - name: 'Fetch data' - id: download_data - run: | - url="https://api.npmjs.org/downloads/range/$(date --date='1 year ago' '+%Y-%m-%d'):$(date '+%Y-%m-%d')/${{ steps.package_name.outputs.package_name }}" - echo "$url" - data=$(curl "$url") - mkdir ./tmp - echo "$data" > ./tmp/npm_downloads.json - echo "data=$data" >> $GITHUB_OUTPUT - timeout-minutes: 5 - - # Print summary of download data: - - name: 'Print summary' - run: | - echo "| Date | Downloads |" >> $GITHUB_STEP_SUMMARY - echo "|------|------------|" >> $GITHUB_STEP_SUMMARY - cat ./tmp/npm_downloads.json | jq -r ".downloads | .[-14:] | to_entries | map(\"| \(.value.day) | \(.value.downloads) |\") |.[]" >> $GITHUB_STEP_SUMMARY - - # Upload the download data: - - name: 'Upload data' - # Pin action to full length commit SHA - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - # Define a name for the uploaded artifact (ensuring a unique name for each job): - name: npm_downloads - - # Specify the path to the file to upload: - path: ./tmp/npm_downloads.json - - # Specify the number of days to retain the artifact (default is 90 days): - retention-days: 90 - timeout-minutes: 10 - if: success() - - # Send data to events server: - - name: 'Post data' - # Pin action to full length commit SHA - uses: distributhor/workflow-webhook@48a40b380ce4593b6a6676528cd005986ae56629 # v3.0.3 - env: - webhook_url: ${{ secrets.STDLIB_NPM_DOWNLOADS_URL }} - webhook_secret: ${{ secrets.STDLIB_WEBHOOK_SECRET }} - data: '{ "downloads": ${{ steps.download_data.outputs.data }} }' - timeout-minutes: 5 - if: success() diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml deleted file mode 100644 index f4575e9..0000000 --- a/.github/workflows/productionize.yml +++ /dev/null @@ -1,794 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2022 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. -#/ - -# Workflow name: -name: productionize - -# Workflow triggers: -on: - # Run workflow when a new commit is pushed to the main branch: - push: - branches: - - main - - # Allow the workflow to be manually run: - workflow_dispatch: - inputs: - require-passing-tests: - description: 'Require passing tests for creating bundles' - type: boolean - default: true - - # Run workflow upon completion of `publish` workflow run: - workflow_run: - workflows: ["publish"] - types: [completed] - - -# Concurrency group to prevent multiple concurrent executions: -concurrency: - group: productionize - cancel-in-progress: true - -# Workflow jobs: -jobs: - - # Define a job to create a production build... - productionize: - - # Define display name: - name: 'Productionize' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Define the sequence of job steps... - steps: - # Checkout main branch of repository: - - name: 'Checkout main branch' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - ref: main - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Create production branch: - - name: 'Create production branch' - run: | - git checkout -b production - - # Transform error messages: - - name: 'Transform error messages' - id: transform-error-messages - uses: stdlib-js/transform-errors-action@main - - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - - name: 'Update dependencies in package.json' - run: | - PKG_VERSION=$(npm view @stdlib/error-tools-fmtprodmsg version) - if grep -q '"@stdlib/string-format"' package.json; then - sed -i "s/\"@stdlib\/string-format\": \"^.*\"/\"@stdlib\/error-tools-fmtprodmsg\": \"^$PKG_VERSION\"/g" package.json - else - node -e "var pkg = require( './package.json' ); pkg.dependencies[ '@stdlib/error-tools-fmtprodmsg' ] = '^$PKG_VERSION'; require( 'fs' ).writeFileSync( 'package.json', JSON.stringify( pkg, null, 2 ) );" - fi - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Transform error messages" - - # Push changes: - - name: 'Push changes' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" production --force - - # Define a job for running tests of the productionized code... - test: - - # Define a display name: - name: 'Run Tests' - - # Define the type of virtual host machine: - runs-on: 'ubuntu-latest' - - # Indicate that this job depends on the prior job finishing: - needs: productionize - - # Run this job regardless of the outcome of the prior job: - if: always() - - # Define the sequence of job steps... - steps: - - # Checkout the repository: - - name: 'Checkout repository' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - with: - # Use the `production` branch: - ref: production - - # Install Node.js: - - name: 'Install Node.js' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Build native add-on if present: - - name: 'Build native add-on (if present)' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - run: | - if [ -f "binding.gyp" ]; then - npm install node-gyp --no-save && ./node_modules/.bin/node-gyp rebuild - fi - - # Run tests: - - name: 'Run tests' - if: ${{ github.event.inputs.require-passing-tests == 'true' }} - id: tests - run: | - npm test || npm test || npm test - - # Define job to create a bundle for use in Deno... - deno: - - # Define display name: - name: 'Create Deno bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `deno` branch exists: - - name: 'Check if remote `deno` branch exists' - id: deno-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin deno - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `deno` exists, delete everything in branch and merge `production` into it - - name: 'If `deno` exists, delete everything in branch and merge `production` into it' - if: steps.deno-branch-exists.outputs.remote-exists - run: | - git checkout -b deno origin/deno - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `deno` does not exist, create `deno` branch: - - name: 'If `deno` does not exist, create `deno` branch' - if: ${{ steps.deno-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b deno - - # Copy files to deno directory: - - name: 'Copy files to deno directory' - run: | - mkdir -p deno - cp README.md LICENSE CONTRIBUTORS NOTICE ./deno - - # Copy TypeScript definitions to deno directory: - if [ -d index.d.ts ]; then - cp index.d.ts ./deno/index.d.ts - fi - if [ -e ./docs/types/index.d.ts ]; then - cp ./docs/types/index.d.ts ./deno/mod.d.ts - fi - - # Install Node.js: - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: Install production and development dependencies - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Bundle package for use in Deno: - - name: 'Bundle package for Deno' - id: deno-bundle - uses: stdlib-js/bundle-action@main - with: - target: 'deno' - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - # Replace links to other packages with links to the deno branch: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/deno/"; - - # Replace reference to `@stdlib/types` with CDN link: - find ./deno -type f -name '*.ts' -print0 | xargs -0 -r sed -Ei "s/\/\/\/ /\/\/\/ /g" - - # Change wording of project description to avoid reference to JavaScript and Node.js: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/a standard library for JavaScript and Node.js, /a standard library /g" - - # Rewrite all `require()`s to use jsDelivr links: - find ./deno -type f -name '*.md' -print0 | xargs -0 sed -Ei "/require\( '@stdlib\// { - s/(var|let|const)\s+([a-z0-9_]+)\s+=\s*require\( '([^']+)' \);/import \2 from \'\3\';/i - s/@stdlib/https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js/ - s/';/@deno\/mod.js';/ - }" - - # Rewrite first `import` to show importing of named exports if available: - exports=$(cat lib/index.js | \ - grep -E 'setReadOnly\(.*,.*,.*\)' | \ - sed -E 's/setReadOnly\((.*),(.*),(.*)\);/\2/' | \ - sed -E "s/'//g" | \ - sort) - if [ -n "$exports" ]; then - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\nimport\s+([a-zA-Z0-9_]+)\s+from\s*'([^']+)';\n\`\`\`/\`\`\`javascript\nimport \1 from '\2';\n\`\`\`\n\nYou can also import the following named exports from the package:\n\n\`\`\`javascript\nimport { $(echo $exports | sed -E 's/ /, /g') } from '\2';\n\`\`\`/" - fi - - # Remove `installation`, `cli`, and `c` sections: - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./deno -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Create package.json file for deno branch: - jq --indent 2 '{"name": .name, "version": .version, "description": .description, "license": .license, "type": "module", "main": "./mod.js", "homepage": .homepage, "repository": .repository, "bugs": .bugs, "keywords": .keywords, "funding": .funding}' package.json > ./deno/package.json - - # Delete everything in current directory aside from deno folder: - - name: 'Delete everything in current directory aside from deno folder' - run: | - find . -type 'f' | grep -v -e "deno" -e ".git/" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e "deno" -e ".git" | xargs -r rm -rf - - # Move deno directory to root: - - name: 'Move deno directory to root' - run: | - mv ./deno/* . - rmdir ./deno - - # Commit changes: - - name: 'Commit changes' - run: | - git add -A - git commit -m "Auto-generated commit" - - # Push changes to `deno` branch: - - name: 'Push changes to `deno` branch' - run: | - SLUG=${{ github.repository }} - echo "Pushing changes to $SLUG..." - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$SLUG.git" deno - - # Send status to Slack channel if job fails: - - name: 'Send status to Slack channel in case of failure' - # Pin action to full length commit SHA - uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 - with: - status: ${{ job.status }} - channel: '#npm-ci' - if: failure() - - # Define job to create a UMD bundle... - umd: - - # Define display name: - name: 'Create UMD bundle' - - # Define the type of virtual host machine on which to run the job: - runs-on: ubuntu-latest - - # Indicate that this job depends on the test job finishing: - needs: test - - # Define the sequence of job steps... - steps: - # Checkout the repository: - - name: 'Checkout repository' - # Pin action to full length commit SHA - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - # Configure Git: - - name: 'Configure Git' - run: | - git config --local user.email "noreply@stdlib.io" - git config --local user.name "stdlib-bot" - - # Check if remote `umd` branch exists: - - name: 'Check if remote `umd` branch exists' - id: umd-branch-exists - continue-on-error: true - run: | - git fetch --all - git ls-remote --exit-code --heads origin umd - if [ $? -eq 0 ]; then - echo "remote-exists=true" >> $GITHUB_OUTPUT - else - echo "remote-exists=false" >> $GITHUB_OUTPUT - fi - - # If `umd` exists, delete everything in branch and merge `production` into it - - name: 'If `umd` exists, delete everything in branch and merge `production` into it' - if: steps.umd-branch-exists.outputs.remote-exists - run: | - git checkout -b umd origin/umd - - find . -type 'f' | grep -v -e ".git/" -e "package.json" -e "README.md" -e "LICENSE" -e "CONTRIBUTORS" -e "NOTICE" | xargs -r rm - find . -mindepth 1 -type 'd' | grep -v -e ".git" | xargs -r rm -rf - - git add -A - git commit -m "Remove files" --allow-empty - - git config merge.theirs.name 'simulate `-s theirs`' - git config merge.theirs.driver 'cat %B > %A' - GIT_CONFIG_PARAMETERS="'merge.default=theirs'" git merge origin/production --allow-unrelated-histories - - # Copy files from `production` branch if necessary: - git checkout origin/production -- . - if [ -n "$(git status --porcelain)" ]; then - git add -A - git commit -m "Auto-generated commit" - fi - - # If `umd` does not exist, create `umd` branch: - - name: 'If `umd` does not exist, create `umd` branch' - if: ${{ steps.umd-branch-exists.outputs.remote-exists == false }} - run: | - git checkout production - git checkout -b umd - - # Copy files to umd directory: - - name: 'Copy files to umd directory' - run: | - mkdir -p umd - cp README.md LICENSE CONTRIBUTORS NOTICE ./umd - - # Install Node.js - - name: 'Install Node.js' - # Pin action to full length commit SHA - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 - with: - node-version: 20 - timeout-minutes: 5 - - # Install dependencies: - - name: 'Install production and development dependencies' - id: install - run: | - npm install || npm install || npm install - timeout-minutes: 15 - - # Extract alias: - - name: 'Extract alias' - id: extract-alias - run: | - alias=$(grep -E 'require\(' README.md | head -n 1 | sed -E 's/^var ([a-zA-Z0-9_]+) = .+/\1/') - echo "alias=${alias}" >> $GITHUB_OUTPUT - - # Create Universal Module Definition (UMD) Node.js bundle: - - name: 'Create Universal Module Definition (UMD) Node.js bundle' - id: umd-bundle-node - uses: stdlib-js/bundle-action@main - with: - target: 'umd-node' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Create Universal Module Definition (UMD) browser bundle: - - name: 'Create Universal Module Definition (UMD) browser bundle' - id: umd-bundle-browser - uses: stdlib-js/bundle-action@main - with: - target: 'umd-browser' - alias: ${{ steps.extract-alias.outputs.alias }} - - # Rewrite file contents: - - name: 'Rewrite file contents' - run: | - - # Replace links to other packages with links to the umd branch: - find ./umd -type f -name '*.md' -print0 | xargs -0 sed -Ei "/\/tree\/main/b; /^\[@stdlib[^:]+: https:\/\/github.com\/stdlib-js\// s/(.*)/\\1\/tree\/umd/"; - - # Remove `installation`, `cli`, and `c` sections: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
[^<]+<\/section>//g;" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.cli \-\->//g" - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?
[\s\S]+<\!\-\- \/.c \-\->//g" - - # Rewrite first `require()` to show consumption of the UMD bundle in Observable and via a `script` tag: - find ./umd -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/\`\`\`javascript\n(var|let|const)\s+([a-zA-Z0-9_]+)\s+=\s*require\( '\@stdlib\/([^']+)' \);\n\`\`\`/To use in Observable,\n\n\`\`\`javascript\n\2 = require\( 'https:\/\/cdn.jsdelivr.net\/gh\/stdlib-js\/\3\@umd\/browser.js' \)\n\`\`\`\n\nTo vendor stdlib functionality and avoid installing dependency trees for Node.js, you can use the UMD server build:\n\n\`\`\`javascript\nvar \2 = require\( 'path\/to\/vendor\/umd\/\3\/index.js' \)\n\`\`\`\n\nTo include the bundle in a webpage,\n\n\`\`\`html\n + + ```
@@ -158,7 +155,7 @@ console.log( objectKeys( ns ) ); ## Notice -This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. +This package is part of [stdlib][stdlib], a standard library with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. @@ -223,79 +220,79 @@ Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors]. -[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape +[@stdlib/ndarray/base/assert/has-equal-shape]: https://github.com/stdlib-js/ndarray-base-assert-has-equal-shape/tree/esm -[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast +[@stdlib/ndarray/base/assert/is-allowed-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type +[@stdlib/ndarray/base/assert/is-boolean-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type +[@stdlib/ndarray/base/assert/is-boolean-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-boolean-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape +[@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape/tree/esm -[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible +[@stdlib/ndarray/base/assert/is-buffer-length-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-buffer-length-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode +[@stdlib/ndarray/base/assert/is-casting-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-casting-mode/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous +[@stdlib/ndarray/base/assert/is-column-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string +[@stdlib/ndarray/base/assert/is-column-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major +[@stdlib/ndarray/base/assert/is-column-major]: https://github.com/stdlib-js/ndarray-base-assert-is-column-major/tree/esm -[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type +[@stdlib/ndarray/base/assert/is-complex-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous +[@stdlib/ndarray/base/assert/is-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type +[@stdlib/ndarray/base/assert/is-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type +[@stdlib/ndarray/base/assert/is-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type +[@stdlib/ndarray/base/assert/is-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode +[@stdlib/ndarray/base/assert/is-index-mode]: https://github.com/stdlib-js/ndarray-base-assert-is-index-mode/tree/esm -[@stdlib/ndarray/base/assert/is-input-casting-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-input-casting-policy +[@stdlib/ndarray/base/assert/is-input-casting-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-input-casting-policy/tree/esm -[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type +[@stdlib/ndarray/base/assert/is-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type +[@stdlib/ndarray/base/assert/is-integer-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-integer-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type +[@stdlib/ndarray/base/assert/is-mask-index-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-mask-index-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type +[@stdlib/ndarray/base/assert/is-numeric-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-numeric-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order +[@stdlib/ndarray/base/assert/is-order]: https://github.com/stdlib-js/ndarray-base-assert-is-order/tree/esm -[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy +[@stdlib/ndarray/base/assert/is-output-data-type-policy]: https://github.com/stdlib-js/ndarray-base-assert-is-output-data-type-policy/tree/esm -[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only +[@stdlib/ndarray/base/assert/is-read-only]: https://github.com/stdlib-js/ndarray-base-assert-is-read-only/tree/esm -[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type +[@stdlib/ndarray/base/assert/is-real-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type +[@stdlib/ndarray/base/assert/is-real-floating-point-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous +[@stdlib/ndarray/base/assert/is-row-major-contiguous]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-contiguous/tree/esm -[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string +[@stdlib/ndarray/base/assert/is-row-major-string]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major-string/tree/esm -[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major +[@stdlib/ndarray/base/assert/is-row-major]: https://github.com/stdlib-js/ndarray-base-assert-is-row-major/tree/esm -[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast +[@stdlib/ndarray/base/assert/is-safe-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-safe-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast +[@stdlib/ndarray/base/assert/is-same-kind-data-type-cast]: https://github.com/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast/tree/esm -[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible +[@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type +[@stdlib/ndarray/base/assert/is-signed-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-signed-integer-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible +[@stdlib/ndarray/base/assert/is-single-segment-compatible]: https://github.com/stdlib-js/ndarray-base-assert-is-single-segment-compatible/tree/esm -[@stdlib/ndarray/base/assert/is-struct-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-struct-data-type +[@stdlib/ndarray/base/assert/is-struct-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-struct-data-type/tree/esm -[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type +[@stdlib/ndarray/base/assert/is-unsigned-integer-data-type]: https://github.com/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type/tree/esm diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 9702d4c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,5 +0,0 @@ -# Security - -> Policy for reporting security vulnerabilities. - -See the security policy [in the main project repository](https://github.com/stdlib-js/stdlib/security). diff --git a/branches.md b/branches.md deleted file mode 100644 index 1f7ebb2..0000000 --- a/branches.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Branches - -This repository has the following branches: - -- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place. -- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network). -- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]). -- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]). -- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]). - -The following diagram illustrates the relationships among the above branches: - -```mermaid -graph TD; -A[stdlib]-->|generate standalone package|B; -B[main] -->|productionize| C[production]; -C -->|bundle| D[esm]; -C -->|bundle| E[deno]; -C -->|bundle| F[umd]; - -%% click A href "https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert" -%% click B href "https://github.com/stdlib-js/ndarray-base-assert/tree/main" -%% click C href "https://github.com/stdlib-js/ndarray-base-assert/tree/production" -%% click D href "https://github.com/stdlib-js/ndarray-base-assert/tree/esm" -%% click E href "https://github.com/stdlib-js/ndarray-base-assert/tree/deno" -%% click F href "https://github.com/stdlib-js/ndarray-base-assert/tree/umd" -``` - -[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/assert -[production-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/production -[deno-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/deno -[deno-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/deno/README.md -[umd-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/umd -[umd-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/umd/README.md -[esm-url]: https://github.com/stdlib-js/ndarray-base-assert/tree/esm -[esm-readme]: https://github.com/stdlib-js/ndarray-base-assert/blob/esm/README.md \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 15e948f..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -import ns from '../docs/types/index'; -export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index a38d54c..0000000 --- a/dist/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict";var i=require('@stdlib/utils-define-read-only-property/dist'),e={};i(e,"hasEqualShape",require('@stdlib/ndarray-base-assert-has-equal-shape/dist'));i(e,"isAllowedDataTypeCast",require('@stdlib/ndarray-base-assert-is-allowed-data-type-cast/dist'));i(e,"isBooleanDataType",require('@stdlib/ndarray-base-assert-is-boolean-data-type/dist'));i(e,"isBooleanIndexDataType",require('@stdlib/ndarray-base-assert-is-boolean-index-data-type/dist'));i(e,"isBufferLengthCompatible",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible/dist'));i(e,"isBufferLengthCompatibleShape",require('@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape/dist'));i(e,"isCastingMode",require('@stdlib/ndarray-base-assert-is-casting-mode/dist'));i(e,"isColumnMajor",require('@stdlib/ndarray-base-assert-is-column-major/dist'));i(e,"isColumnMajorContiguous",require('@stdlib/ndarray-base-assert-is-column-major-contiguous/dist'));i(e,"isColumnMajorString",require('@stdlib/ndarray-base-assert-is-column-major-string/dist'));i(e,"isComplexFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-complex-floating-point-data-type/dist'));i(e,"isContiguous",require('@stdlib/ndarray-base-assert-is-contiguous/dist'));i(e,"isDataType",require('@stdlib/ndarray-base-assert-is-data-type/dist'));i(e,"isDataTypeString",require('@stdlib/ndarray-base-assert-is-data-type-string/dist'));i(e,"isFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-floating-point-data-type/dist'));i(e,"isIndexDataType",require('@stdlib/ndarray-base-assert-is-index-data-type/dist'));i(e,"isIndexMode",require('@stdlib/ndarray-base-assert-is-index-mode/dist'));i(e,"isInputCastingPolicy",require('@stdlib/ndarray-base-assert-is-input-casting-policy/dist'));i(e,"isIntegerDataType",require('@stdlib/ndarray-base-assert-is-integer-data-type/dist'));i(e,"isIntegerIndexDataType",require('@stdlib/ndarray-base-assert-is-integer-index-data-type/dist'));i(e,"isMaskIndexDataType",require('@stdlib/ndarray-base-assert-is-mask-index-data-type/dist'));i(e,"isMostlySafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast/dist'));i(e,"isNumericDataType",require('@stdlib/ndarray-base-assert-is-numeric-data-type/dist'));i(e,"isOrder",require('@stdlib/ndarray-base-assert-is-order/dist'));i(e,"isOutputDataTypePolicy",require('@stdlib/ndarray-base-assert-is-output-data-type-policy/dist'));i(e,"isReadOnly",require('@stdlib/ndarray-base-assert-is-read-only/dist'));i(e,"isRealDataType",require('@stdlib/ndarray-base-assert-is-real-data-type/dist'));i(e,"isRealFloatingPointDataType",require('@stdlib/ndarray-base-assert-is-real-floating-point-data-type/dist'));i(e,"isRowMajor",require('@stdlib/ndarray-base-assert-is-row-major/dist'));i(e,"isRowMajorContiguous",require('@stdlib/ndarray-base-assert-is-row-major-contiguous/dist'));i(e,"isRowMajorString",require('@stdlib/ndarray-base-assert-is-row-major-string/dist'));i(e,"isSafeDataTypeCast",require('@stdlib/ndarray-base-assert-is-safe-data-type-cast/dist'));i(e,"isSameKindDataTypeCast",require('@stdlib/ndarray-base-assert-is-same-kind-data-type-cast/dist'));i(e,"isScalarMostlySafeCompatible",require('@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible/dist'));i(e,"isSignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-signed-integer-data-type/dist'));i(e,"isSingleSegmentCompatible",require('@stdlib/ndarray-base-assert-is-single-segment-compatible/dist'));i(e,"isStructDataType",require('@stdlib/ndarray-base-assert-is-struct-data-type/dist'));i(e,"isUnsignedIntegerDataType",require('@stdlib/ndarray-base-assert-is-unsigned-integer-data-type/dist'));module.exports=e; -/** @license Apache-2.0 */ -//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 23a4581..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nsetReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nsetReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nsetReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nsetReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) );\n\n/**\n* @name isDataTypeString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type-string}\n*/\nsetReadOnly( ns, 'isDataTypeString', require( '@stdlib/ndarray-base-assert-is-data-type-string' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nsetReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nsetReadOnly( ns, 'isInputCastingPolicy', require( '@stdlib/ndarray-base-assert-is-input-casting-policy' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nsetReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nsetReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nsetReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nsetReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) );\n\n/**\n* @name isStructDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-struct-data-type}\n*/\nsetReadOnly( ns, 'isStructDataType', require( '@stdlib/ndarray-base-assert-is-struct-data-type' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "aA0BA,IAAIA,EAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,wBAAyB,QAAS,uDAAwD,CAAE,EAS7GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,2BAA4B,QAAS,yDAA0D,CAAE,EASlHD,EAAaC,EAAI,gCAAiC,QAAS,+DAAgE,CAAE,EAS7HD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,gBAAiB,QAAS,6CAA8C,CAAE,EAS3FD,EAAaC,EAAI,0BAA2B,QAAS,wDAAyD,CAAE,EAShHD,EAAaC,EAAI,sBAAuB,QAAS,oDAAqD,CAAE,EASxGD,EAAaC,EAAI,iCAAkC,QAAS,iEAAkE,CAAE,EAShID,EAAaC,EAAI,eAAgB,QAAS,2CAA4C,CAAE,EASxFD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,kBAAmB,QAAS,gDAAiD,CAAE,EAShGD,EAAaC,EAAI,cAAe,QAAS,2CAA4C,CAAE,EASvFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,sBAAuB,QAAS,qDAAsD,CAAE,EASzGD,EAAaC,EAAI,2BAA4B,QAAS,2DAA4D,CAAE,EASpHD,EAAaC,EAAI,oBAAqB,QAAS,kDAAmD,CAAE,EASpGD,EAAaC,EAAI,UAAW,QAAS,sCAAuC,CAAE,EAS9ED,EAAaC,EAAI,yBAA0B,QAAS,wDAAyD,CAAE,EAS/GD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,iBAAkB,QAAS,+CAAgD,CAAE,EAS9FD,EAAaC,EAAI,8BAA+B,QAAS,8DAA+D,CAAE,EAS1HD,EAAaC,EAAI,aAAc,QAAS,0CAA2C,CAAE,EASrFD,EAAaC,EAAI,uBAAwB,QAAS,qDAAsD,CAAE,EAS1GD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,qBAAsB,QAAS,oDAAqD,CAAE,EASvGD,EAAaC,EAAI,yBAA0B,QAAS,yDAA0D,CAAE,EAShHD,EAAaC,EAAI,+BAAgC,QAAS,8DAA+D,CAAE,EAS3HD,EAAaC,EAAI,0BAA2B,QAAS,yDAA0D,CAAE,EASjHD,EAAaC,EAAI,4BAA6B,QAAS,0DAA2D,CAAE,EASpHD,EAAaC,EAAI,mBAAoB,QAAS,iDAAkD,CAAE,EASlGD,EAAaC,EAAI,4BAA6B,QAAS,2DAA4D,CAAE,EAKrH,OAAO,QAAUA", - "names": ["setReadOnly", "ns"] -} diff --git a/docs/types/test.ts b/docs/types/test.ts deleted file mode 100644 index c2dd14e..0000000 --- a/docs/types/test.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* -* @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. -*/ - -/* eslint-disable @typescript-eslint/no-unused-expressions */ - -import ns = require( './index' ); - - -// TESTS // - -// The exported value is the expected interface... -{ - ns; // $ExpectType Namespace -} diff --git a/examples/index.js b/examples/index.js deleted file mode 100644 index 1c381c9..0000000 --- a/examples/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/** -* @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'; - -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - -console.log( objectKeys( ns ) ); diff --git a/docs/types/index.d.ts b/index.d.ts similarity index 100% rename from docs/types/index.d.ts rename to index.d.ts diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..c6d385e --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 +/// +import s from"https://cdn.jsdelivr.net/gh/stdlib-js/utils-define-read-only-property@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";export{default as hasEqualShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-has-equal-shape@esm/index.mjs";import t from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";export{default as isAllowedDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-allowed-data-type-cast@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";export{default as isBooleanDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-data-type@v0.1.0-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";export{default as isBooleanIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-boolean-index-data-type@esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";export{default as isBufferLengthCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible@v0.1.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";export{default as isBufferLengthCompatibleShape}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-buffer-length-compatible-shape@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";export{default as isCastingMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-casting-mode@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";export{default as isColumnMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";export{default as isColumnMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-contiguous@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";export{default as isColumnMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-column-major-string@esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isComplexFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-complex-floating-point-data-type@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";export{default as isContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-contiguous@v0.2.2-esm/index.mjs";import y from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";export{default as isDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type@v0.2.2-esm/index.mjs";import b from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type-string@esm/index.mjs";export{default as isDataTypeString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-data-type-string@esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-floating-point-data-type@v0.2.2-esm/index.mjs";import g from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";export{default as isIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-data-type@esm/index.mjs";import f from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";export{default as isIndexMode}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-index-mode@v0.2.2-esm/index.mjs";import x from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";export{default as isInputCastingPolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-input-casting-policy@esm/index.mjs";import c from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";export{default as isIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-data-type@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";export{default as isIntegerIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-integer-index-data-type@esm/index.mjs";import u from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";export{default as isMaskIndexDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mask-index-data-type@esm/index.mjs";import D from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isMostlySafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-mostly-safe-data-type-cast@v0.2.2-esm/index.mjs";import T from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";export{default as isNumericDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-numeric-data-type@v0.2.2-esm/index.mjs";import C from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";export{default as isOrder}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-order@v0.2.2-esm/index.mjs";import S from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";export{default as isOutputDataTypePolicy}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-output-data-type-policy@esm/index.mjs";import M from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";export{default as isReadOnly}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-read-only@v0.2.2-esm/index.mjs";import I from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";export{default as isRealDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-data-type@v0.2.2-esm/index.mjs";import w from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";export{default as isRealFloatingPointDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-real-floating-point-data-type@v0.2.2-esm/index.mjs";import R from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";export{default as isRowMajor}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major@v0.2.2-esm/index.mjs";import P from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";export{default as isRowMajorContiguous}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-contiguous@v0.2.1-esm/index.mjs";import B from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";export{default as isRowMajorString}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-row-major-string@esm/index.mjs";import k from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSafeDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-safe-data-type-cast@v0.2.2-esm/index.mjs";import F from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";export{default as isSameKindDataTypeCast}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-same-kind-data-type-cast@v0.2.2-esm/index.mjs";import O from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";export{default as isScalarMostlySafeCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible@esm/index.mjs";import q from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";export{default as isSignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-signed-integer-data-type@v0.2.2-esm/index.mjs";import L from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";export{default as isSingleSegmentCompatible}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-single-segment-compatible@v0.2.2-esm/index.mjs";import A from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-struct-data-type@esm/index.mjs";export{default as isStructDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-struct-data-type@esm/index.mjs";import E from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";export{default as isUnsignedIntegerDataType}from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-assert-is-unsigned-integer-data-type@v0.2.2-esm/index.mjs";var K={};s(K,"hasEqualShape",e),s(K,"isAllowedDataTypeCast",t),s(K,"isBooleanDataType",a),s(K,"isBooleanIndexDataType",r),s(K,"isBufferLengthCompatible",i),s(K,"isBufferLengthCompatibleShape",d),s(K,"isCastingMode",n),s(K,"isColumnMajor",m),s(K,"isColumnMajorContiguous",o),s(K,"isColumnMajorString",l),s(K,"isComplexFloatingPointDataType",p),s(K,"isContiguous",j),s(K,"isDataType",y),s(K,"isDataTypeString",b),s(K,"isFloatingPointDataType",h),s(K,"isIndexDataType",g),s(K,"isIndexMode",f),s(K,"isInputCastingPolicy",x),s(K,"isIntegerDataType",c),s(K,"isIntegerIndexDataType",v),s(K,"isMaskIndexDataType",u),s(K,"isMostlySafeDataTypeCast",D),s(K,"isNumericDataType",T),s(K,"isOrder",C),s(K,"isOutputDataTypePolicy",S),s(K,"isReadOnly",M),s(K,"isRealDataType",I),s(K,"isRealFloatingPointDataType",w),s(K,"isRowMajor",R),s(K,"isRowMajorContiguous",P),s(K,"isRowMajorString",B),s(K,"isSafeDataTypeCast",k),s(K,"isSameKindDataTypeCast",F),s(K,"isScalarMostlySafeCompatible",O),s(K,"isSignedIntegerDataType",q),s(K,"isSingleSegmentCompatible",L),s(K,"isStructDataType",A),s(K,"isUnsignedIntegerDataType",E);export{K as default}; +//# sourceMappingURL=index.mjs.map diff --git a/index.mjs.map b/index.mjs.map new file mode 100644 index 0000000..dd86d5c --- /dev/null +++ b/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../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/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-read-only-property';\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name hasEqualShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape}\n*/\nimport hasEqualShape from '@stdlib/ndarray-base-assert-has-equal-shape';\nsetReadOnly( ns, 'hasEqualShape', hasEqualShape );\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nimport isAllowedDataTypeCast from '@stdlib/ndarray-base-assert-is-allowed-data-type-cast';\nsetReadOnly( ns, 'isAllowedDataTypeCast', isAllowedDataTypeCast );\n\n/**\n* @name isBooleanDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type}\n*/\nimport isBooleanDataType from '@stdlib/ndarray-base-assert-is-boolean-data-type';\nsetReadOnly( ns, 'isBooleanDataType', isBooleanDataType );\n\n/**\n* @name isBooleanIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type}\n*/\nimport isBooleanIndexDataType from '@stdlib/ndarray-base-assert-is-boolean-index-data-type';\nsetReadOnly( ns, 'isBooleanIndexDataType', isBooleanIndexDataType );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nimport isBufferLengthCompatible from '@stdlib/ndarray-base-assert-is-buffer-length-compatible';\nsetReadOnly( ns, 'isBufferLengthCompatible', isBufferLengthCompatible );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nimport isBufferLengthCompatibleShape from '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape';\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', isBufferLengthCompatibleShape );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nimport isCastingMode from '@stdlib/ndarray-base-assert-is-casting-mode';\nsetReadOnly( ns, 'isCastingMode', isCastingMode );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nimport isColumnMajor from '@stdlib/ndarray-base-assert-is-column-major';\nsetReadOnly( ns, 'isColumnMajor', isColumnMajor );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nimport isColumnMajorContiguous from '@stdlib/ndarray-base-assert-is-column-major-contiguous';\nsetReadOnly( ns, 'isColumnMajorContiguous', isColumnMajorContiguous );\n\n/**\n* @name isColumnMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string}\n*/\nimport isColumnMajorString from '@stdlib/ndarray-base-assert-is-column-major-string';\nsetReadOnly( ns, 'isColumnMajorString', isColumnMajorString );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nimport isComplexFloatingPointDataType from '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type';\nsetReadOnly( ns, 'isComplexFloatingPointDataType', isComplexFloatingPointDataType );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nimport isContiguous from '@stdlib/ndarray-base-assert-is-contiguous';\nsetReadOnly( ns, 'isContiguous', isContiguous );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nimport isDataType from '@stdlib/ndarray-base-assert-is-data-type';\nsetReadOnly( ns, 'isDataType', isDataType );\n\n/**\n* @name isDataTypeString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type-string}\n*/\nimport isDataTypeString from '@stdlib/ndarray-base-assert-is-data-type-string';\nsetReadOnly( ns, 'isDataTypeString', isDataTypeString );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nimport isFloatingPointDataType from '@stdlib/ndarray-base-assert-is-floating-point-data-type';\nsetReadOnly( ns, 'isFloatingPointDataType', isFloatingPointDataType );\n\n/**\n* @name isIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type}\n*/\nimport isIndexDataType from '@stdlib/ndarray-base-assert-is-index-data-type';\nsetReadOnly( ns, 'isIndexDataType', isIndexDataType );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nimport isIndexMode from '@stdlib/ndarray-base-assert-is-index-mode';\nsetReadOnly( ns, 'isIndexMode', isIndexMode );\n\n/**\n* @name isInputCastingPolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy}\n*/\nimport isInputCastingPolicy from '@stdlib/ndarray-base-assert-is-input-casting-policy';\nsetReadOnly( ns, 'isInputCastingPolicy', isInputCastingPolicy );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nimport isIntegerDataType from '@stdlib/ndarray-base-assert-is-integer-data-type';\nsetReadOnly( ns, 'isIntegerDataType', isIntegerDataType );\n\n/**\n* @name isIntegerIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type}\n*/\nimport isIntegerIndexDataType from '@stdlib/ndarray-base-assert-is-integer-index-data-type';\nsetReadOnly( ns, 'isIntegerIndexDataType', isIntegerIndexDataType );\n\n/**\n* @name isMaskIndexDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type}\n*/\nimport isMaskIndexDataType from '@stdlib/ndarray-base-assert-is-mask-index-data-type';\nsetReadOnly( ns, 'isMaskIndexDataType', isMaskIndexDataType );\n\n/**\n* @name isMostlySafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast}\n*/\nimport isMostlySafeDataTypeCast from '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast';\nsetReadOnly( ns, 'isMostlySafeDataTypeCast', isMostlySafeDataTypeCast );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nimport isNumericDataType from '@stdlib/ndarray-base-assert-is-numeric-data-type';\nsetReadOnly( ns, 'isNumericDataType', isNumericDataType );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nimport isOrder from '@stdlib/ndarray-base-assert-is-order';\nsetReadOnly( ns, 'isOrder', isOrder );\n\n/**\n* @name isOutputDataTypePolicy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy}\n*/\nimport isOutputDataTypePolicy from '@stdlib/ndarray-base-assert-is-output-data-type-policy';\nsetReadOnly( ns, 'isOutputDataTypePolicy', isOutputDataTypePolicy );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nimport isReadOnly from '@stdlib/ndarray-base-assert-is-read-only';\nsetReadOnly( ns, 'isReadOnly', isReadOnly );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nimport isRealDataType from '@stdlib/ndarray-base-assert-is-real-data-type';\nsetReadOnly( ns, 'isRealDataType', isRealDataType );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nimport isRealFloatingPointDataType from '@stdlib/ndarray-base-assert-is-real-floating-point-data-type';\nsetReadOnly( ns, 'isRealFloatingPointDataType', isRealFloatingPointDataType );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nimport isRowMajor from '@stdlib/ndarray-base-assert-is-row-major';\nsetReadOnly( ns, 'isRowMajor', isRowMajor );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nimport isRowMajorContiguous from '@stdlib/ndarray-base-assert-is-row-major-contiguous';\nsetReadOnly( ns, 'isRowMajorContiguous', isRowMajorContiguous );\n\n/**\n* @name isRowMajorString\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string}\n*/\nimport isRowMajorString from '@stdlib/ndarray-base-assert-is-row-major-string';\nsetReadOnly( ns, 'isRowMajorString', isRowMajorString );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nimport isSafeDataTypeCast from '@stdlib/ndarray-base-assert-is-safe-data-type-cast';\nsetReadOnly( ns, 'isSafeDataTypeCast', isSafeDataTypeCast );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nimport isSameKindDataTypeCast from '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast';\nsetReadOnly( ns, 'isSameKindDataTypeCast', isSameKindDataTypeCast );\n\n/**\n* @name isScalarMostlySafeCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible}\n*/\nimport isScalarMostlySafeCompatible from '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible';\nsetReadOnly( ns, 'isScalarMostlySafeCompatible', isScalarMostlySafeCompatible );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nimport isSignedIntegerDataType from '@stdlib/ndarray-base-assert-is-signed-integer-data-type';\nsetReadOnly( ns, 'isSignedIntegerDataType', isSignedIntegerDataType );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nimport isSingleSegmentCompatible from '@stdlib/ndarray-base-assert-is-single-segment-compatible';\nsetReadOnly( ns, 'isSingleSegmentCompatible', isSingleSegmentCompatible );\n\n/**\n* @name isStructDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-struct-data-type}\n*/\nimport isStructDataType from '@stdlib/ndarray-base-assert-is-struct-data-type';\nsetReadOnly( ns, 'isStructDataType', isStructDataType );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nimport isUnsignedIntegerDataType from '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type';\nsetReadOnly( ns, 'isUnsignedIntegerDataType', isUnsignedIntegerDataType );\n\n\n// EXPORTS //\n\nexport default ns;\n"],"names":["ns","setReadOnly","hasEqualShape","isAllowedDataTypeCast","isBooleanDataType","isBooleanIndexDataType","isBufferLengthCompatible","isBufferLengthCompatibleShape","isCastingMode","isColumnMajor","isColumnMajorContiguous","isColumnMajorString","isComplexFloatingPointDataType","isContiguous","isDataType","isDataTypeString","isFloatingPointDataType","isIndexDataType","isIndexMode","isInputCastingPolicy","isIntegerDataType","isIntegerIndexDataType","isMaskIndexDataType","isMostlySafeDataTypeCast","isNumericDataType","isOrder","isOutputDataTypePolicy","isReadOnly","isRealDataType","isRealFloatingPointDataType","isRowMajor","isRowMajorContiguous","isRowMajorString","isSafeDataTypeCast","isSameKindDataTypeCast","isScalarMostlySafeCompatible","isSignedIntegerDataType","isSingleSegmentCompatible","isStructDataType","isUnsignedIntegerDataType"],"mappings":";;isTAoCA,IAAAA,EAAA,CAAA,EAUAC,EAAAD,EAAA,gBAAAE,GAUAD,EAAAD,EAAA,wBAAAG,GAUAF,EAAAD,EAAA,oBAAAI,GAUAH,EAAAD,EAAA,yBAAAK,GAUAJ,EAAAD,EAAA,2BAAAM,GAUAL,EAAAD,EAAA,gCAAAO,GAUAN,EAAAD,EAAA,gBAAAQ,GAUAP,EAAAD,EAAA,gBAAAS,GAUAR,EAAAD,EAAA,0BAAAU,GAUAT,EAAAD,EAAA,sBAAAW,GAUAV,EAAAD,EAAA,iCAAAY,GAUAX,EAAAD,EAAA,eAAAa,GAUAZ,EAAAD,EAAA,aAAAc,GAUAb,EAAAD,EAAA,mBAAAe,GAUAd,EAAAD,EAAA,0BAAAgB,GAUAf,EAAAD,EAAA,kBAAAiB,GAUAhB,EAAAD,EAAA,cAAAkB,GAUAjB,EAAAD,EAAA,uBAAAmB,GAUAlB,EAAAD,EAAA,oBAAAoB,GAUAnB,EAAAD,EAAA,yBAAAqB,GAUApB,EAAAD,EAAA,sBAAAsB,GAUArB,EAAAD,EAAA,2BAAAuB,GAUAtB,EAAAD,EAAA,oBAAAwB,GAUAvB,EAAAD,EAAA,UAAAyB,GAUAxB,EAAAD,EAAA,yBAAA0B,GAUAzB,EAAAD,EAAA,aAAA2B,GAUA1B,EAAAD,EAAA,iBAAA4B,GAUA3B,EAAAD,EAAA,8BAAA6B,GAUA5B,EAAAD,EAAA,aAAA8B,GAUA7B,EAAAD,EAAA,uBAAA+B,GAUA9B,EAAAD,EAAA,mBAAAgC,GAUA/B,EAAAD,EAAA,qBAAAiC,GAUAhC,EAAAD,EAAA,yBAAAkC,GAUAjC,EAAAD,EAAA,+BAAAmC,GAUAlC,EAAAD,EAAA,0BAAAoC,GAUAnC,EAAAD,EAAA,4BAAAqC,GAUApC,EAAAD,EAAA,mBAAAsC,GAUArC,EAAAD,EAAA,4BAAAuC"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 759ca24..0000000 --- a/lib/index.js +++ /dev/null @@ -1,384 +0,0 @@ -/** -* @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'; - -/* -* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. -*/ - -// MODULES // - -var setReadOnly = require( '@stdlib/utils-define-read-only-property' ); - - -// MAIN // - -/** -* Top-level namespace. -* -* @namespace ns -*/ -var ns = {}; - -/** -* @name hasEqualShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/has-equal-shape} -*/ -setReadOnly( ns, 'hasEqualShape', require( '@stdlib/ndarray-base-assert-has-equal-shape' ) ); - -/** -* @name isAllowedDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast} -*/ -setReadOnly( ns, 'isAllowedDataTypeCast', require( '@stdlib/ndarray-base-assert-is-allowed-data-type-cast' ) ); - -/** -* @name isBooleanDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-data-type} -*/ -setReadOnly( ns, 'isBooleanDataType', require( '@stdlib/ndarray-base-assert-is-boolean-data-type' ) ); - -/** -* @name isBooleanIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-boolean-index-data-type} -*/ -setReadOnly( ns, 'isBooleanIndexDataType', require( '@stdlib/ndarray-base-assert-is-boolean-index-data-type' ) ); - -/** -* @name isBufferLengthCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible} -*/ -setReadOnly( ns, 'isBufferLengthCompatible', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible' ) ); - -/** -* @name isBufferLengthCompatibleShape -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape} -*/ -setReadOnly( ns, 'isBufferLengthCompatibleShape', require( '@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape' ) ); - -/** -* @name isCastingMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode} -*/ -setReadOnly( ns, 'isCastingMode', require( '@stdlib/ndarray-base-assert-is-casting-mode' ) ); - -/** -* @name isColumnMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major} -*/ -setReadOnly( ns, 'isColumnMajor', require( '@stdlib/ndarray-base-assert-is-column-major' ) ); - -/** -* @name isColumnMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous} -*/ -setReadOnly( ns, 'isColumnMajorContiguous', require( '@stdlib/ndarray-base-assert-is-column-major-contiguous' ) ); - -/** -* @name isColumnMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-string} -*/ -setReadOnly( ns, 'isColumnMajorString', require( '@stdlib/ndarray-base-assert-is-column-major-string' ) ); - -/** -* @name isComplexFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type} -*/ -setReadOnly( ns, 'isComplexFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-complex-floating-point-data-type' ) ); - -/** -* @name isContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous} -*/ -setReadOnly( ns, 'isContiguous', require( '@stdlib/ndarray-base-assert-is-contiguous' ) ); - -/** -* @name isDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type} -*/ -setReadOnly( ns, 'isDataType', require( '@stdlib/ndarray-base-assert-is-data-type' ) ); - -/** -* @name isDataTypeString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-data-type-string} -*/ -setReadOnly( ns, 'isDataTypeString', require( '@stdlib/ndarray-base-assert-is-data-type-string' ) ); - -/** -* @name isFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type} -*/ -setReadOnly( ns, 'isFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-floating-point-data-type' ) ); - -/** -* @name isIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-data-type} -*/ -setReadOnly( ns, 'isIndexDataType', require( '@stdlib/ndarray-base-assert-is-index-data-type' ) ); - -/** -* @name isIndexMode -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode} -*/ -setReadOnly( ns, 'isIndexMode', require( '@stdlib/ndarray-base-assert-is-index-mode' ) ); - -/** -* @name isInputCastingPolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-input-casting-policy} -*/ -setReadOnly( ns, 'isInputCastingPolicy', require( '@stdlib/ndarray-base-assert-is-input-casting-policy' ) ); - -/** -* @name isIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type} -*/ -setReadOnly( ns, 'isIntegerDataType', require( '@stdlib/ndarray-base-assert-is-integer-data-type' ) ); - -/** -* @name isIntegerIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-integer-index-data-type} -*/ -setReadOnly( ns, 'isIntegerIndexDataType', require( '@stdlib/ndarray-base-assert-is-integer-index-data-type' ) ); - -/** -* @name isMaskIndexDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mask-index-data-type} -*/ -setReadOnly( ns, 'isMaskIndexDataType', require( '@stdlib/ndarray-base-assert-is-mask-index-data-type' ) ); - -/** -* @name isMostlySafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast} -*/ -setReadOnly( ns, 'isMostlySafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast' ) ); - -/** -* @name isNumericDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type} -*/ -setReadOnly( ns, 'isNumericDataType', require( '@stdlib/ndarray-base-assert-is-numeric-data-type' ) ); - -/** -* @name isOrder -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-order} -*/ -setReadOnly( ns, 'isOrder', require( '@stdlib/ndarray-base-assert-is-order' ) ); - -/** -* @name isOutputDataTypePolicy -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-output-data-type-policy} -*/ -setReadOnly( ns, 'isOutputDataTypePolicy', require( '@stdlib/ndarray-base-assert-is-output-data-type-policy' ) ); - -/** -* @name isReadOnly -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-read-only} -*/ -setReadOnly( ns, 'isReadOnly', require( '@stdlib/ndarray-base-assert-is-read-only' ) ); - -/** -* @name isRealDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type} -*/ -setReadOnly( ns, 'isRealDataType', require( '@stdlib/ndarray-base-assert-is-real-data-type' ) ); - -/** -* @name isRealFloatingPointDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type} -*/ -setReadOnly( ns, 'isRealFloatingPointDataType', require( '@stdlib/ndarray-base-assert-is-real-floating-point-data-type' ) ); - -/** -* @name isRowMajor -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major} -*/ -setReadOnly( ns, 'isRowMajor', require( '@stdlib/ndarray-base-assert-is-row-major' ) ); - -/** -* @name isRowMajorContiguous -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous} -*/ -setReadOnly( ns, 'isRowMajorContiguous', require( '@stdlib/ndarray-base-assert-is-row-major-contiguous' ) ); - -/** -* @name isRowMajorString -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-string} -*/ -setReadOnly( ns, 'isRowMajorString', require( '@stdlib/ndarray-base-assert-is-row-major-string' ) ); - -/** -* @name isSafeDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast} -*/ -setReadOnly( ns, 'isSafeDataTypeCast', require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' ) ); - -/** -* @name isSameKindDataTypeCast -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast} -*/ -setReadOnly( ns, 'isSameKindDataTypeCast', require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' ) ); - -/** -* @name isScalarMostlySafeCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-scalar-mostly-safe-compatible} -*/ -setReadOnly( ns, 'isScalarMostlySafeCompatible', require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' ) ); - -/** -* @name isSignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type} -*/ -setReadOnly( ns, 'isSignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' ) ); - -/** -* @name isSingleSegmentCompatible -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible} -*/ -setReadOnly( ns, 'isSingleSegmentCompatible', require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' ) ); - -/** -* @name isStructDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-struct-data-type} -*/ -setReadOnly( ns, 'isStructDataType', require( '@stdlib/ndarray-base-assert-is-struct-data-type' ) ); - -/** -* @name isUnsignedIntegerDataType -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type} -*/ -setReadOnly( ns, 'isUnsignedIntegerDataType', require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' ) ); - - -// EXPORTS // - -module.exports = ns; diff --git a/package.json b/package.json index 5744407..96e6cc3 100644 --- a/package.json +++ b/package.json @@ -3,30 +3,8 @@ "version": "0.3.0", "description": "Base ndarray assertion utilities.", "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "lib/index.js", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "test": "make test", - "test-cov": "make test-cov", - "examples": "make examples", - "benchmark": "make benchmark" - }, + "type": "module", + "main": "./index.mjs", "homepage": "https://stdlib.io", "repository": { "type": "git", @@ -35,105 +13,6 @@ "bugs": { "url": "https://github.com/stdlib-js/stdlib/issues" }, - "dependencies": { - "@stdlib/ndarray-base-assert-has-equal-shape": "github:stdlib-js/ndarray-base-assert-has-equal-shape#main", - "@stdlib/ndarray-base-assert-is-allowed-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-boolean-data-type": "^0.1.0", - "@stdlib/ndarray-base-assert-is-boolean-index-data-type": "github:stdlib-js/ndarray-base-assert-is-boolean-index-data-type#main", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible": "^0.1.2", - "@stdlib/ndarray-base-assert-is-buffer-length-compatible-shape": "^0.2.2", - "@stdlib/ndarray-base-assert-is-casting-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-column-major-string": "github:stdlib-js/ndarray-base-assert-is-column-major-string#main", - "@stdlib/ndarray-base-assert-is-complex-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-contiguous": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-data-type-string": "github:stdlib-js/ndarray-base-assert-is-data-type-string#main", - "@stdlib/ndarray-base-assert-is-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-index-data-type": "github:stdlib-js/ndarray-base-assert-is-index-data-type#main", - "@stdlib/ndarray-base-assert-is-index-mode": "^0.2.2", - "@stdlib/ndarray-base-assert-is-input-casting-policy": "github:stdlib-js/ndarray-base-assert-is-input-casting-policy#main", - "@stdlib/ndarray-base-assert-is-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-integer-index-data-type": "github:stdlib-js/ndarray-base-assert-is-integer-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mask-index-data-type": "github:stdlib-js/ndarray-base-assert-is-mask-index-data-type#main", - "@stdlib/ndarray-base-assert-is-mostly-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-numeric-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-order": "^0.2.2", - "@stdlib/ndarray-base-assert-is-output-data-type-policy": "github:stdlib-js/ndarray-base-assert-is-output-data-type-policy#main", - "@stdlib/ndarray-base-assert-is-read-only": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-real-floating-point-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major": "^0.2.2", - "@stdlib/ndarray-base-assert-is-row-major-contiguous": "^0.2.1", - "@stdlib/ndarray-base-assert-is-row-major-string": "github:stdlib-js/ndarray-base-assert-is-row-major-string#main", - "@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-same-kind-data-type-cast": "^0.2.2", - "@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible": "github:stdlib-js/ndarray-base-assert-is-scalar-mostly-safe-compatible#main", - "@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.2.2", - "@stdlib/ndarray-base-assert-is-single-segment-compatible": "^0.2.2", - "@stdlib/ndarray-base-assert-is-struct-data-type": "github:stdlib-js/ndarray-base-assert-is-struct-data-type#main", - "@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.2.2", - "@stdlib/utils-define-read-only-property": "^0.2.2" - }, - "devDependencies": { - "@stdlib/array-base-assert-contains": "^0.2.2", - "@stdlib/array-base-assert-has-equal-values-indexed": "github:stdlib-js/array-base-assert-has-equal-values-indexed#main", - "@stdlib/array-cartesian-square": "^0.2.2", - "@stdlib/assert-is-boolean": "^0.2.2", - "@stdlib/assert-is-complex-like": "^0.2.2", - "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/assert-is-integer": "^0.2.2", - "@stdlib/assert-is-number": "^0.2.2", - "@stdlib/assert-is-positive-integer": "^0.2.2", - "@stdlib/complex-float64-ctor": "^0.0.3", - "@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main", - "@stdlib/dstructs-struct": "github:stdlib-js/dstructs-struct#main", - "@stdlib/math-base-special-abs": "^0.2.2", - "@stdlib/math-base-special-floor": "^0.2.3", - "@stdlib/ndarray-array": "^0.2.1", - "@stdlib/ndarray-base-flag": "^0.2.2", - "@stdlib/ndarray-base-iteration-order": "^0.2.2", - "@stdlib/ndarray-base-min-signed-integer-dtype": "github:stdlib-js/ndarray-base-min-signed-integer-dtype#main", - "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2", - "@stdlib/ndarray-base-numel": "^0.2.2", - "@stdlib/ndarray-base-shape": "^0.2.2", - "@stdlib/ndarray-base-shape2strides": "^0.2.2", - "@stdlib/ndarray-base-strides2offset": "^0.2.2", - "@stdlib/ndarray-casting-modes": "^0.2.2", - "@stdlib/ndarray-dtypes": "^0.3.0", - "@stdlib/ndarray-index-modes": "^0.2.2", - "@stdlib/ndarray-input-casting-policies": "github:stdlib-js/ndarray-input-casting-policies#main", - "@stdlib/ndarray-min-dtype": "^0.3.0", - "@stdlib/ndarray-mostly-safe-casts": "^0.3.0", - "@stdlib/ndarray-orders": "^0.2.2", - "@stdlib/ndarray-output-dtype-policies": "^0.2.2", - "@stdlib/ndarray-safe-casts": "^0.3.0", - "@stdlib/ndarray-same-kind-casts": "^0.3.0", - "@stdlib/random-base-discrete-uniform": "^0.2.1", - "@stdlib/random-base-randu": "^0.2.1", - "@stdlib/error-tools-fmtprodmsg": "^0.2.2", - "@stdlib/utils-keys": "^0.2.2", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "istanbul": "^0.4.1", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "@stdlib/bench-harness": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], "keywords": [ "stdlib", "stdtypes", diff --git a/stats.html b/stats.html new file mode 100644 index 0000000..08f2f2f --- /dev/null +++ b/stats.html @@ -0,0 +1,4842 @@ + + + + + + + + Rollup Visualizer + + + +
+ + + + + diff --git a/test/dist/test.js b/test/dist/test.js deleted file mode 100644 index a8a9c60..0000000 --- a/test/dist/test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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 tape = require( 'tape' ); -var main = require( './../../dist' ); - - -// TESTS // - -tape( 'main export is defined', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( main !== void 0, true, 'main export is defined' ); - t.end(); -}); diff --git a/test/test.js b/test/test.js deleted file mode 100644 index 1bbe5f9..0000000 --- a/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** -* @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'; - -// MODULES // - -var tape = require( 'tape' ); -var objectKeys = require( '@stdlib/utils-keys' ); -var ns = require( './../lib' ); - - -// TESTS // - -tape( 'main export is an object', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof ns, 'object', 'main export is an object' ); - t.end(); -}); - -tape( 'the exported object contains key-value pairs', function test( t ) { - var keys = objectKeys( ns ); - t.equal( keys.length > 0, true, 'has keys' ); - t.end(); -});